From e575b1f0b49cd5175c6555d0a0ef415b613de243 Mon Sep 17 00:00:00 2001 From: Andrew Hyland Date: Fri, 4 Sep 2009 04:33:17 +0000 Subject: [PATCH] #34 Add 'Hide Editor' button --- oaiorebuilder/content/annotations_view_init.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/oaiorebuilder/content/annotations_view_init.js b/oaiorebuilder/content/annotations_view_init.js index b297af09..e48622bd 100644 --- a/oaiorebuilder/content/annotations_view_init.js +++ b/oaiorebuilder/content/annotations_view_init.js @@ -140,8 +140,8 @@ lore.ui.anno.LOREColumnTreeNodeUI = Ext.extend(Ext.tree.TreeNodeUI, { // private - focus: Ext.emptyFn, - onTextChange: function( txtfield) { + focus : Ext.emptyFn, + onTextChange : function( txtfield) { if(this.rendered){ this.textNode.innerHTML = txtfield.text; this.titleNode.innerHTML = txtfield.title; @@ -150,7 +150,7 @@ } }, - refresh: function (n) { + refresh : function (n) { var t = n.getOwnerTree(); var cols = t.columns; for (var i =0; i < cols.length; i++ ){ @@ -159,7 +159,7 @@ this.bodyNode.style.width= cols[0].width- t.borderWidth -(32 + n.getDepth() * 16); }, - renderElements: function(n, a, targetNode, bulkRender){ + renderElements : function(n, a, targetNode, bulkRender){ // add some indent caching, this helps performance when rendering a large tree this.indentMarkup = n.parentNode ? n.parentNode.ui.getChildIndent() : ''; @@ -530,6 +530,10 @@ loreuieditor = function (model ) { anchor: '-30 100%' }], buttons: [{ + text: 'Hide Editor', + id: 'hideeditbtn', + tooltip: 'Hides the annotation editor from view' + },{ text: 'Save Annotation', id: 'updannobtn', tooltip: 'Save the annotation to the repository' @@ -676,6 +680,7 @@ lore.ui.anno.initExtComponents = function(){ Ext.getCmp("resetannobtn") .on('click', function () { lore.ui.anno.rejectChanges()}); + Ext.getCmp("hideeditbtn").on('click', lore.ui.anno.hideAnnotation); Ext.getCmp("updannobtn").on('click', lore.ui.anno.handleSaveAnnotationChanges); Ext.getCmp("delannobtn").on('click', lore.ui.anno.deleteMsgBoxShow); Ext.getCmp("updctxtbtn").on('click',