fix watch/unwatch buttons
This commit is contained in:
parent
4dca3df391
commit
122696796b
@ -553,6 +553,10 @@ height:100%;
|
||||
.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #d82020; text-decoration: none; }
|
||||
.ui-widget :active { outline: none; }
|
||||
|
||||
/* watch button fixes */
|
||||
.watchButtonLabel.ui-state-active, .watchButtonLabel.ui-state-focus { border: 1px solid #ccc; color: #2565a5; }
|
||||
.watchButtonLabel.ui-state-hover { color: #d82020; border: 1px solid #d82020; }
|
||||
|
||||
.ui-tabs .ui-tabs-panel {
|
||||
padding-top:0;
|
||||
}
|
||||
|
@ -46,28 +46,23 @@
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
$('#watch').click(function() {
|
||||
$.update(
|
||||
'/channels/<%= @channel.id %>/watch',
|
||||
// data to send
|
||||
{
|
||||
flag: this.checked
|
||||
},
|
||||
// if post was successful
|
||||
function (response) {
|
||||
if ($("#watch").attr("checked")) {
|
||||
$("#watchText").text("Un-watch");
|
||||
}
|
||||
else {
|
||||
$("#watchText").text("Watch");
|
||||
}
|
||||
}
|
||||
|
||||
);
|
||||
});
|
||||
$('#watch').click(function() {
|
||||
var checked = this.checked;
|
||||
$.update(
|
||||
'/channels/<%= @channel.id %>/watch',
|
||||
{ flag: checked },
|
||||
function (response) {
|
||||
if (checked) {
|
||||
$("#watchText").text("Un-watch");
|
||||
} else {
|
||||
$("#watchText").text("Watch");
|
||||
}
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
$(function () {
|
||||
$(document).on('page:load ready', function() {
|
||||
$(".timeago").timeago();
|
||||
if(document.location.hash!='') {
|
||||
|
||||
|
@ -20,28 +20,26 @@
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$('#watch').click(function() {
|
||||
$.update(
|
||||
'/channels/<%= @channel.id %>/watch',
|
||||
{
|
||||
flag: this.checked
|
||||
},
|
||||
function (response) {
|
||||
if ($("#watch").attr("checked")) {
|
||||
$("#watchText").text("Un-watch");
|
||||
}
|
||||
else {
|
||||
$("#watchText").text("Watch");
|
||||
}
|
||||
}
|
||||
);
|
||||
});
|
||||
$('#watch').click(function() {
|
||||
var checked = this.checked;
|
||||
$.update(
|
||||
'/channels/<%= @channel.id %>/watch',
|
||||
{ flag: checked },
|
||||
function (response) {
|
||||
if (checked) {
|
||||
$("#watchText").text("Un-watch");
|
||||
} else {
|
||||
$("#watchText").text("Watch");
|
||||
}
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
$("#devInfoLink").click(function() {
|
||||
$("#devInfo").dialog("open") ;
|
||||
});
|
||||
|
||||
$(function () {
|
||||
$(document).on('page:load ready', function() {
|
||||
$("#devInfo").dialog({
|
||||
autoOpen:false,
|
||||
resizable:false,
|
||||
|
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user