Skip to content

Commit

Permalink
Fix for switches being unswitched
Browse files Browse the repository at this point in the history
Fix for table data being purged
  • Loading branch information
Pavion committed Apr 1, 2016
1 parent 5a9f25d commit f8f6460
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 2 additions & 0 deletions js/jquery.slickswitch.js
Expand Up @@ -62,13 +62,15 @@

self.bind('ss-toggleOn', function () {
self[0].checked = true;
self.attr("checked","checked");
settings.toggledOn(self);
settings.toggled(self);
self.trigger('ss-update');
});

self.bind('ss-toggleOff', function () {
self[0].checked = false;
self.removeAttr("checked");
settings.toggledOff(self);
settings.toggled(self);
self.trigger('ss-update');
Expand Down
9 changes: 6 additions & 3 deletions js/tvstreamrecord.basic.js
Expand Up @@ -672,6 +672,7 @@ $(function() {
"bAutoWidth": false,
"sAjaxSource": "/getrecordlist",
"stateSave": true,
"stateDuration": 60 * 60 * 60 * 24,
"stateSaveCallback": function (oSettings, oData) {
oData.search.search=''; // Don't save search text
localStorage.setItem( 'DataTables_'+where(), JSON.stringify(oData) );
Expand Down Expand Up @@ -801,8 +802,7 @@ $(function() {
var epggrab = 0;
if ($("#switch_list_active").attr("checked") == "checked") {akt = 1;}
if ($("#switch_list_grab").attr("checked") == "checked") {epggrab = 1;}
console.log(akt);
console.log(epggrab);

post("/create_channel", {
prev: $("#prev").val(),
ccid: $("#ccid").val(),
Expand Down Expand Up @@ -870,6 +870,7 @@ $(function() {
"bProcessing": true,
"sAjaxSource": "/channellist",
"stateSave": true,
"stateDuration": 60 * 60 * 60 * 24,
"stateSaveCallback": function (oSettings, oData) {
oData.search.search=''; // Don't save search text
localStorage.setItem( 'DataTables_'+where(), JSON.stringify(oData) );
Expand Down Expand Up @@ -1100,6 +1101,7 @@ $(function() {
},
"bServerSide": serverSide,
"stateSave": true,
"stateDuration": 60 * 60 * 60 * 24,
"stateSaveCallback": function (oSettings, oData) {
oData.search.search=''; // Don't save search text
localStorage.setItem( 'DataTables_'+where(), JSON.stringify(oData) );
Expand Down Expand Up @@ -1259,7 +1261,7 @@ $(function() {
}
} else if ($(this).attr('id').startsWith('cfg_switch') && $(this).attr('type')!="checkbox") {
value = "null";
} else if ($(this).attr('id').startsWith('cfg_switch')) {
} else if ($(this).attr('id').startsWith('cfg_switch')) {
value = ($(this).attr('checked')=="checked") ? "1" : "0";
} else if ( // Reload page on this changes only
($(this).attr('id')=="cfg_theme") ||
Expand Down Expand Up @@ -1358,6 +1360,7 @@ $(function() {
"bProcessing": true,
"sAjaxSource": "/logget",
"stateSave": true,
"stateDuration": 60 * 60 * 60 * 24,
"stateSaveCallback": function (oSettings, oData) {
oData.search.search=''; // Don't save search text
localStorage.setItem( 'DataTables_'+where(), JSON.stringify(oData) );
Expand Down

0 comments on commit f8f6460

Please sign in to comment.