commit 3e11379c3a879d881431d931e4edad3fbf839063
parent ba16889bb0cde38f841f30d0ad3d18620393e974
Author: David Norton <david@nortoncrew.com>
Date: Tue, 13 Jun 2006 20:45:30 +0000
Notes now automatically save - no "save" button.
The collections list does not resize randomly now.
The pane on the right stays open all the time - even when 0/multiple items are selected. This is to avoid frequent resizing of the items pane.
Temporarily, if the first "word" of a field's value is more than 29 characters long, it will set it to crop. This is for the long URLs, etc.
Diffstat:
4 files changed, 26 insertions(+), 13 deletions(-)
diff --git a/chrome/chromeFiles/content/scholar/itemPane.js b/chrome/chromeFiles/content/scholar/itemPane.js
@@ -143,12 +143,20 @@ ScholarItemPane = new function()
function createValueElement(valueText, fieldName)
{
var valueElement = document.createElement("label");
- valueElement.appendChild(document.createTextNode(valueText));
if(fieldName)
{
valueElement.setAttribute('fieldname',fieldName);
valueElement.setAttribute('onclick', 'ScholarItemPane.showEditor(this);');
}
+
+ var firstSpace = valueText.indexOf(" ");
+ if((firstSpace == -1 && valueText.length > 29 ) || firstSpace > 29)
+ {
+ valueElement.setAttribute('crop', 'end');
+ valueElement.setAttribute('value',valueText);
+ }
+ else
+ valueElement.appendChild(document.createTextNode(valueText));
return valueElement;
}
diff --git a/chrome/chromeFiles/content/scholar/itemPane.xul b/chrome/chromeFiles/content/scholar/itemPane.xul
@@ -26,9 +26,10 @@
</grid>
</vbox>
<vbox>
- <textbox id="scholar-notes" multiline="true" flex="1"
- fieldname="notes" onblur="ScholarItemPane.modifyField('notes',this.value);"/>
- <button label="Save" oncommand="ScholarItemPane.modifyField('notes',document.getElementById('scholar-notes').value);"/>
+ <textbox id="scholar-notes"
+ type="timed" timeout="1000" oncommand="ScholarItemPane.modifyField('notes',this.value);"
+ multiline="true" flex="1"
+ onblur="ScholarItemPane.modifyField('notes',this.value);"/>
</vbox>
</tabpanels>
</tabbox>
diff --git a/chrome/chromeFiles/content/scholar/overlay.js b/chrome/chromeFiles/content/scholar/overlay.js
@@ -74,7 +74,7 @@ var ScholarPane = new function()
{
ScholarItemPane.viewItem(new Scholar.Item(typeID));
document.getElementById('scholar-view-item').hidden = false;
- document.getElementById('scholar-view-splitter').hidden = false;
+ document.getElementById('scholar-view-selected-label').hidden = true;
}
function newCollection()
@@ -97,13 +97,13 @@ var ScholarPane = new function()
itemsView = new Scholar.ItemTreeView(collection);
document.getElementById('items-tree').view = itemsView;
document.getElementById('tb-rename').disabled = collection.isLibrary();
+ itemsView.selection.clearSelection();
}
else
{
document.getElementById('items-tree').view = itemsView = null;
document.getElementById('tb-rename').disabled = true;
}
-
}
function itemSelected()
@@ -115,13 +115,14 @@ var ScholarPane = new function()
ScholarItemPane.viewItem(item);
document.getElementById('scholar-view-item').hidden = false;
- document.getElementById('scholar-view-splitter').hidden = false;
+ document.getElementById('scholar-view-selected-label').hidden = true;
}
else
{
document.getElementById('scholar-view-item').hidden = true;
- document.getElementById('scholar-view-splitter').hidden = true;
-
+ var label = document.getElementById('scholar-view-selected-label');
+ label.hidden = false;
+ label.value = itemsView.selection.count + " items selected.";
}
}
diff --git a/chrome/chromeFiles/content/scholar/overlay.xul b/chrome/chromeFiles/content/scholar/overlay.xul
@@ -21,7 +21,7 @@
<vbox id="appcontent">
<hbox id="scholar-pane" position="1" persist="height collapsed">
- <vbox persist="width" flex="1" style="min-width: 150px;">
+ <vbox persist="width" width="200" style="min-width: 150px;">
<toolbar>
<toolbarbutton label="&toolbar.newCollection.label;" command="cmd_scholar_newCollection"/>
<toolbarbutton id="tb-rename" label="&toolbar.renameCollection.label;" oncommand="ScholarPane.renameSelectedCollection();" disabled="true"/>
@@ -43,7 +43,7 @@
</tree>
</vbox>
<splitter id="scholar-tree-splitter" resizebefore="closest" resizeafter="closest"/>
- <vbox persist="width" flex="5" style="min-width: 300px;">
+ <vbox persist="width" flex="1" style="min-width: 300px;">
<toolbar align="center">
<toolbarbutton id="tb-add" label="&toolbar.newItem.label;" type="menu">
<menupopup>
@@ -102,8 +102,11 @@
</tree>
</vbox>
- <separator orient="vertical" class="thin" id="scholar-view-splitter" hidden="true"/>
- <tabbox id="scholar-view-item" hidden="true" flex="2" style="min-width: 300px; max-width: 300px;"/>
+ <splitter id="scholar-view-splitter" collapse="after"><grippy/></splitter>
+ <box width="300" style="min-width: 300px;" pack="center" align="center">
+ <label id="scholar-view-selected-label" style="text-align: center;"/>
+ <tabbox id="scholar-view-item" hidden="true" flex="1"/>
+ </box>
</hbox>
<splitter id="scholar-splitter" resizebefore="closest" resizeafter="closest" position="2" persist="collapsed"/>
</vbox>