Skip to content

Commit

Permalink
use prop instead of attr for jquery
Browse files Browse the repository at this point in the history
  • Loading branch information
Phill committed Nov 6, 2017
1 parent 52fa0f8 commit 6cc0125
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion assets/publishbutton.css
@@ -1,5 +1,5 @@
.page-edit .field-publishbutton {
display: none;
/*display: none;*/
}

.publishbutton-trigger.disabled {
Expand Down
4 changes: 2 additions & 2 deletions assets/publishbutton.js
Expand Up @@ -61,14 +61,14 @@
.removeClass('disabled')
.text(Symphony.Language.get('Published'));

input.attr('checked', true);
input.prop('checked', true);
}
else {
button
.addClass('disabled')
.text(Symphony.Language.get('Unpublished'));

input.attr('checked', false);
input.prop('checked', false);
}
},
});
Expand Down
2 changes: 1 addition & 1 deletion extension.driver.php
Expand Up @@ -17,7 +17,7 @@ public function install() {
CREATE TABLE IF NOT EXISTS `tbl_fields_publishbutton` (
`id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
`field_id` INT(11) UNSIGNED NOT NULL,
`default_state` ENUM('on', 'off') NOT NULL DEFAULT 'on',
`state` ENUM('on', 'off') NOT NULL DEFAULT 'on',
PRIMARY KEY (`id`),
KEY `field_id` (`field_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
Expand Down
1 change: 1 addition & 0 deletions lib/update.php
Expand Up @@ -16,5 +16,6 @@
$state = $_REQUEST['state'];
}

// var_dump(Symphony::Database()->update(array('value' => $state), 'tbl_entries_data_' . $field_id, '`entry_id` = ' . $entry_id)); exit;
// Update the field in the database:
Symphony::Database()->update(array('value' => $state), 'tbl_entries_data_' . $field_id, '`entry_id` = ' . $entry_id);

0 comments on commit 6cc0125

Please sign in to comment.