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;
|
||||
}
|
||||
|
@ -47,27 +47,22 @@
|
||||
<script type="text/javascript">
|
||||
|
||||
$('#watch').click(function() {
|
||||
var checked = this.checked;
|
||||
$.update(
|
||||
'/channels/<%= @channel.id %>/watch',
|
||||
// data to send
|
||||
{
|
||||
flag: this.checked
|
||||
},
|
||||
// if post was successful
|
||||
{ flag: checked },
|
||||
function (response) {
|
||||
if ($("#watch").attr("checked")) {
|
||||
if (checked) {
|
||||
$("#watchText").text("Un-watch");
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$("#watchText").text("Watch");
|
||||
}
|
||||
}
|
||||
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
$(function () {
|
||||
$(document).on('page:load ready', function() {
|
||||
$(".timeago").timeago();
|
||||
if(document.location.hash!='') {
|
||||
|
||||
|
@ -21,16 +21,14 @@
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$('#watch').click(function() {
|
||||
var checked = this.checked;
|
||||
$.update(
|
||||
'/channels/<%= @channel.id %>/watch',
|
||||
{
|
||||
flag: this.checked
|
||||
},
|
||||
{ flag: checked },
|
||||
function (response) {
|
||||
if ($("#watch").attr("checked")) {
|
||||
if (checked) {
|
||||
$("#watchText").text("Un-watch");
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$("#watchText").text("Watch");
|
||||
}
|
||||
}
|
||||
@ -41,7 +39,7 @@
|
||||
$("#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