forked from 0x2620/pandora
invalidate cache after editing title or name; make open (doubleclick or return) trigger edit
This commit is contained in:
parent
416744a527
commit
31ca407a17
2 changed files with 14 additions and 0 deletions
|
@ -1,6 +1,8 @@
|
||||||
// vim: et:ts=4:sw=4:sts=4:ft=javascript
|
// vim: et:ts=4:sw=4:sts=4:ft=javascript
|
||||||
pandora.ui.namesDialog = function() {
|
pandora.ui.namesDialog = function() {
|
||||||
|
|
||||||
|
// FIXME: add cache invalidation
|
||||||
|
|
||||||
var height = Math.round((window.innerHeight - 48) * 0.9),
|
var height = Math.round((window.innerHeight - 48) * 0.9),
|
||||||
width = 576 + Ox.UI.SCROLLBAR_SIZE,
|
width = 576 + Ox.UI.SCROLLBAR_SIZE,
|
||||||
numberOfNames = 0,
|
numberOfNames = 0,
|
||||||
|
@ -80,7 +82,13 @@ pandora.ui.namesDialog = function() {
|
||||||
+ ' name' + (numberOfNames == 1 ? '' : 's')
|
+ ' name' + (numberOfNames == 1 ? '' : 's')
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
open: function(data) {
|
||||||
|
$list.$element
|
||||||
|
.find('.OxItem.OxSelected > .OxCell.OxColumnSortname')
|
||||||
|
.trigger('mousedown');
|
||||||
|
},
|
||||||
submit: function(data) {
|
submit: function(data) {
|
||||||
|
Ox.Request.clearCache('findNames');
|
||||||
pandora.api.editName({
|
pandora.api.editName({
|
||||||
id: data.id,
|
id: data.id,
|
||||||
sortname: data.value
|
sortname: data.value
|
||||||
|
|
|
@ -71,7 +71,13 @@ pandora.ui.titlesDialog = function() {
|
||||||
+ ' title' + (numberOfTitles == 1 ? '' : 's')
|
+ ' title' + (numberOfTitles == 1 ? '' : 's')
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
open: function(data) {
|
||||||
|
$list.$element
|
||||||
|
.find('.OxItem.OxSelected > .OxCell.OxColumnSorttitle')
|
||||||
|
.trigger('mousedown');
|
||||||
|
},
|
||||||
submit: function(data) {
|
submit: function(data) {
|
||||||
|
Ox.Request.clearCache('findTitles');
|
||||||
pandora.api.editTitle({
|
pandora.api.editTitle({
|
||||||
id: data.id,
|
id: data.id,
|
||||||
sorttitle: data.value
|
sorttitle: data.value
|
||||||
|
|
Loading…
Reference in a new issue