mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-13 22:45:56 +00:00
pref-labels/index: cleanup
This commit is contained in:
@@ -190,51 +190,51 @@ class Pref_Labels extends Handler_Protected {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function index() {
|
function index() {
|
||||||
|
?>
|
||||||
print "<div dojoType='dijit.layout.BorderContainer' gutters='false'>";
|
<div dojoType='dijit.layout.BorderContainer' gutters='false'>
|
||||||
print "<div style='padding : 0px' dojoType='dijit.layout.ContentPane' region='top'>";
|
<div style='padding : 0px' dojoType='dijit.layout.ContentPane' region='top'>
|
||||||
print "<div dojoType='fox.Toolbar'>";
|
<div dojoType='fox.Toolbar'>
|
||||||
|
<div dojoType='fox.form.DropDownButton'>
|
||||||
print "<div dojoType='fox.form.DropDownButton'>".
|
<span><?php echo __('Select') ?></span>
|
||||||
"<span>" . __('Select')."</span>";
|
<div dojoType='dijit.Menu' style='display: none'>
|
||||||
print "<div dojoType=\"dijit.Menu\" style=\"display: none;\">";
|
<div onclick="dijit.byId('labelTree').model.setAllChecked(true)"
|
||||||
print "<div onclick=\"dijit.byId('labelTree').model.setAllChecked(true)\"
|
dojoType='dijit.MenuItem'><?php echo('All') ?></div>
|
||||||
dojoType=\"dijit.MenuItem\">".__('All')."</div>";
|
<div onclick="dijit.byId('labelTree').model.setAllChecked(false)"
|
||||||
print "<div onclick=\"dijit.byId('labelTree').model.setAllChecked(false)\"
|
dojoType='dijit.MenuItem'><?php echo('None') ?></div>
|
||||||
dojoType=\"dijit.MenuItem\">".__('None')."</div>";
|
|
||||||
print "</div></div>";
|
|
||||||
|
|
||||||
print"<button dojoType=\"dijit.form.Button\" onclick=\"CommonDialogs.addLabel()\">".
|
|
||||||
__('Create label')."</button dojoType=\"dijit.form.Button\"> ";
|
|
||||||
|
|
||||||
print "<button dojoType=\"dijit.form.Button\" onclick=\"dijit.byId('labelTree').removeSelected()\">".
|
|
||||||
__('Remove')."</button dojoType=\"dijit.form.Button\"> ";
|
|
||||||
|
|
||||||
print "<button dojoType=\"dijit.form.Button\" onclick=\"dijit.byId('labelTree').resetColors()\">".
|
|
||||||
__('Clear colors')."</button dojoType=\"dijit.form.Button\">";
|
|
||||||
|
|
||||||
|
|
||||||
print "</div>"; #toolbar
|
|
||||||
print "</div>"; #pane
|
|
||||||
print "<div style='padding : 0px' dojoType=\"dijit.layout.ContentPane\" region=\"center\">";
|
|
||||||
|
|
||||||
print "<div id=\"labellistLoading\">
|
|
||||||
<img src='images/indicator_tiny.gif'>".
|
|
||||||
__("Loading, please wait...")."</div>";
|
|
||||||
|
|
||||||
print "<div dojoType=\"dojo.data.ItemFileWriteStore\" jsId=\"labelStore\"
|
|
||||||
url=\"backend.php?op=pref-labels&method=getlabeltree\">
|
|
||||||
</div>
|
</div>
|
||||||
<div dojoType=\"lib.CheckBoxStoreModel\" jsId=\"labelModel\" store=\"labelStore\"
|
|
||||||
query=\"{id:'root'}\" rootId=\"root\"
|
|
||||||
childrenAttrs=\"items\" checkboxStrict=\"false\" checkboxAll=\"false\">
|
|
||||||
</div>
|
</div>
|
||||||
<div dojoType=\"fox.PrefLabelTree\" id=\"labelTree\"
|
|
||||||
model=\"labelModel\" openOnClick=\"true\">
|
<button dojoType='dijit.form.Button' onclick='CommonDialogs.addLabel()'>
|
||||||
<script type=\"dojo/method\" event=\"onLoad\" args=\"item\">
|
<?php echo('Create label') ?></button dojoType='dijit.form.Button'>
|
||||||
Element.hide(\"labellistLoading\");
|
|
||||||
|
<button dojoType='dijit.form.Button' onclick="dijit.byId('labelTree').removeSelected()">
|
||||||
|
<?php echo('Remove') ?></button dojoType='dijit.form.Button'>
|
||||||
|
|
||||||
|
<button dojoType='dijit.form.Button' onclick="dijit.byId('labelTree').resetColors()">
|
||||||
|
<?php echo('Clear colors') ?></button dojoType='dijit.form.Button'>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style='padding : 0px' dojoType='dijit.layout.ContentPane' region='center'>
|
||||||
|
<div id='labellistLoading'>
|
||||||
|
<img src='images/indicator_tiny.gif'><?php echo("Loading, please wait...") ?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div dojoType='dojo.data.ItemFileWriteStore' jsId='labelStore'
|
||||||
|
url='backend.php?op=pref-labels&method=getlabeltree'>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div dojoType='lib.CheckBoxStoreModel' jsId='labelModel' store='labelStore'
|
||||||
|
query="{id:'root'}" rootId='root'
|
||||||
|
childrenAttrs='items' checkboxStrict='false' checkboxAll='false'>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div dojoType='fox.PrefLabelTree' id='labelTree' model='labelModel' openOnClick='true'>
|
||||||
|
<script type='dojo/method' event='onLoad' args='item'>
|
||||||
|
Element.hide('labellistLoading');
|
||||||
</script>
|
</script>
|
||||||
<script type=\"dojo/method\" event=\"onClick\" args=\"item\">
|
<script type='dojo/method' event='onClick' args='item'>
|
||||||
var id = String(item.id);
|
var id = String(item.id);
|
||||||
var bare_id = id.substr(id.indexOf(':')+1);
|
var bare_id = id.substr(id.indexOf(':')+1);
|
||||||
|
|
||||||
@@ -242,13 +242,10 @@ class Pref_Labels extends Handler_Protected {
|
|||||||
dijit.byId('labelTree').editLabel(bare_id);
|
dijit.byId('labelTree').editLabel(bare_id);
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
</div>";
|
</div>
|
||||||
|
</div>
|
||||||
print "</div>"; #pane
|
<?php PluginHost::getInstance()->run_hooks(PluginHost::HOOK_PREFS_TAB, "prefLabels") ?>
|
||||||
|
</div>
|
||||||
PluginHost::getInstance()->run_hooks(PluginHost::HOOK_PREFS_TAB, "prefLabels");
|
<?php
|
||||||
|
|
||||||
print "</div>"; #container
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user