fix preference tree elements not being properly clickable in Firefox

This commit is contained in:
Andrew Dolgov 2010-11-21 23:05:51 +03:00
parent bcf5ed46e3
commit 8a097fa381
6 changed files with 20 additions and 19 deletions

View File

@ -48,13 +48,5 @@ dojo.declare("fox.PrefFilterTree", lib.CheckBoxTree, {
return (!item.error || item.error == '') ? "dijitTreeRow" :
"dijitTreeRow Error";
},
onClick: function (item) {
var id = String(item.id);
var bare_id = id.substr(id.indexOf(':')+1);
if (id.match('FILTER:')) {
editFilter(bare_id, event);
}
},
});

View File

@ -39,13 +39,5 @@ dojo.declare("fox.PrefLabelTree", lib.CheckBoxTree, {
getIconClass: function (item, opened) {
return (!item || this.model.mayHaveChildren(item)) ? (opened ? "dijitFolderOpened" : "dijitFolderClosed") : "invisible";
},
onClick: function (item) {
var id = String(item.id);
var bare_id = id.substr(id.indexOf(':')+1);
if (id.match('LABEL:')) {
editLabel(bare_id, event);
}
},
});

View File

@ -1220,9 +1220,9 @@
var bare_id = id.substr(id.indexOf(':')+1);
if (id.match('FEED:')) {
editFeed(bare_id, event);
editFeed(bare_id);
} else if (id.match('CAT:')) {
editCat(bare_id, item, event);
editCat(bare_id, item);
}
</script>
<script type=\"dojo/method\" event=\"onLoad\" args=\"item\">

View File

@ -435,6 +435,15 @@
<script type=\"dojo/method\" event=\"onLoad\" args=\"item\">
Element.hide(\"filterlistLoading\");
</script>
<script type=\"dojo/method\" event=\"onClick\" args=\"item\">
var id = String(item.id);
var bare_id = id.substr(id.indexOf(':')+1);
if (id.match('FILTER:')) {
editFilter(bare_id);
}
</script>
</div>";
print "</div>"; #pane

View File

@ -304,6 +304,14 @@
<script type=\"dojo/method\" event=\"onLoad\" args=\"item\">
Element.hide(\"labellistLoading\");
</script>
<script type=\"dojo/method\" event=\"onClick\" args=\"item\">
var id = String(item.id);
var bare_id = id.substr(id.indexOf(':')+1);
if (id.match('LABEL:')) {
editLabel(bare_id);
}
</script>
</div>";
print "</div>"; #pane

View File

@ -166,7 +166,7 @@ function editUser(id, event) {
}
function editFilter(id, event) {
function editFilter(id) {
try {
var query = "backend.php?op=pref-filters&subop=edit&id=" + param_escape(id);