ability to toggle display of subcategories on categories page (#284)
* ability to toggle display of subcategories on categories page * settingsv2main
parent
e4b468e9e9
commit
7be7d322ce
@ -0,0 +1,24 @@
|
|||||||
|
'use strict';
|
||||||
|
/* globals $, app */
|
||||||
|
|
||||||
|
define('admin/plugins/persona', ['settings'], function(Settings) {
|
||||||
|
|
||||||
|
var ACP = {};
|
||||||
|
|
||||||
|
ACP.init = function() {
|
||||||
|
Settings.load('persona', $('.persona-settings'));
|
||||||
|
|
||||||
|
$('#save').on('click', function() {
|
||||||
|
Settings.save('persona', $('.persona-settings'), function() {
|
||||||
|
app.alert({
|
||||||
|
type: 'success',
|
||||||
|
alert_id: 'persona-saved',
|
||||||
|
title: 'Settings Saved',
|
||||||
|
message: 'Persona settings saved'
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
return ACP;
|
||||||
|
});
|
@ -0,0 +1,17 @@
|
|||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-2 col-xs-12 settings-header">Theme Settings</div>
|
||||||
|
<div class="col-sm-10 col-xs-12">
|
||||||
|
<form role="form" class="persona-settings">
|
||||||
|
<div class="checkbox">
|
||||||
|
<label class="mdl-switch mdl-js-switch mdl-js-ripple-effect">
|
||||||
|
<input class="mdl-switch__input" type="checkbox" id="hideSubCategories" name="hideSubCategories">
|
||||||
|
<span class="mdl-switch__label"><strong>Hide subcategories on categories view</strong></span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<button id="save" class="floating-button mdl-button mdl-js-button mdl-button--fab mdl-js-ripple-effect mdl-button--colored">
|
||||||
|
<i class="material-icons">save</i>
|
||||||
|
</button>
|
Loading…
Reference in New Issue