Several little interface bugs fixed regarding Notes.
This commit is contained in:
parent
b94cf81ba3
commit
1096a95f62
|
@ -116,14 +116,15 @@ ScholarItemPane = new function()
|
|||
var icon = document.createElement('image');
|
||||
icon.setAttribute('src','chrome://scholar/skin/treeitem-note.png');
|
||||
|
||||
var button = document.createElement('label');
|
||||
button.setAttribute('value',_noteToTitle(_itemBeingEdited.getNote(notes[i])));
|
||||
var label = document.createElement('label');
|
||||
label.setAttribute('value',_noteToTitle(_itemBeingEdited.getNote(notes[i])));
|
||||
label.setAttribute('crop','end');
|
||||
|
||||
box = document.createElement('box');
|
||||
box.setAttribute('onclick',"window.open('chrome://scholar/content/note.xul?item="+_itemBeingEdited.getID()+"¬e="+notes[i]+"','','chrome,resizable,centerscreen');");
|
||||
box.setAttribute('class','clicky');
|
||||
box.appendChild(icon);
|
||||
box.appendChild(button);
|
||||
box.appendChild(label);
|
||||
|
||||
var removeButton = document.createElement('label');
|
||||
removeButton.setAttribute("value","-");
|
||||
|
|
|
@ -25,14 +25,14 @@
|
|||
<column/>
|
||||
<column flex="1"/>
|
||||
</columns>
|
||||
|
||||
<rows id="editpane-dynamic-fields" flex="1">
|
||||
</rows>
|
||||
<rows id="editpane-dynamic-fields" flex="1"/>
|
||||
</grid>
|
||||
</vbox>
|
||||
<vbox>
|
||||
<button label="New Note" oncommand="ScholarItemPane.addNote();"/>
|
||||
<label id="editpane-notes-label"/>
|
||||
<vbox flex="1">
|
||||
<hbox align="center">
|
||||
<label id="editpane-notes-label"/>
|
||||
<button label="New Note" oncommand="ScholarItemPane.addNote();"/>
|
||||
</hbox>
|
||||
<grid flex="1">
|
||||
<columns>
|
||||
<column flex="1"/>
|
||||
|
|
|
@ -6,6 +6,8 @@ var _notesField;
|
|||
function onLoad()
|
||||
{
|
||||
_notesField = document.getElementById('notes-box');
|
||||
_notesField.focus();
|
||||
|
||||
var params = new Array();
|
||||
var b = document.location.href.substr(document.location.href.indexOf('?')+1).split('&');
|
||||
for(var i = 0; i < b.length; i++)
|
||||
|
@ -22,6 +24,11 @@ function onLoad()
|
|||
_notesField.setAttribute('value',item.getNote(noteID));
|
||||
}
|
||||
|
||||
function onUnload()
|
||||
{
|
||||
save();
|
||||
}
|
||||
|
||||
function save()
|
||||
{
|
||||
if(noteID)
|
||||
|
@ -30,4 +37,5 @@ function save()
|
|||
noteID = item.addNote(_notesField.value);
|
||||
}
|
||||
|
||||
addEventListener("load", function(e) { onLoad(e); }, false);
|
||||
addEventListener("load", function(e) { onLoad(e); }, false);
|
||||
addEventListener("unload", function(e) { onUnload(e); }, false);
|
|
@ -12,6 +12,11 @@
|
|||
|
||||
<script src="include.js"/>
|
||||
<script src="note.js"/>
|
||||
|
||||
<keyset>
|
||||
<key id="key_close" key="W" modifiers="accel" command="cmd_close"/>
|
||||
</keyset>
|
||||
<command id="cmd_close" oncommand="window.close();"/>
|
||||
|
||||
<label id="info-label"/>
|
||||
<textbox id="notes-box" flex="1" multiline="true" type="timed" timeout="1000" oncommand="save();"/>
|
||||
|
|
|
@ -90,7 +90,7 @@ vbox #scholar-pane
|
|||
width: 150px;
|
||||
}
|
||||
|
||||
#scholar-info
|
||||
#scholar-view-item vbox
|
||||
{
|
||||
overflow: auto;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user