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');
|
var icon = document.createElement('image');
|
||||||
icon.setAttribute('src','chrome://scholar/skin/treeitem-note.png');
|
icon.setAttribute('src','chrome://scholar/skin/treeitem-note.png');
|
||||||
|
|
||||||
var button = document.createElement('label');
|
var label = document.createElement('label');
|
||||||
button.setAttribute('value',_noteToTitle(_itemBeingEdited.getNote(notes[i])));
|
label.setAttribute('value',_noteToTitle(_itemBeingEdited.getNote(notes[i])));
|
||||||
|
label.setAttribute('crop','end');
|
||||||
|
|
||||||
box = document.createElement('box');
|
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('onclick',"window.open('chrome://scholar/content/note.xul?item="+_itemBeingEdited.getID()+"¬e="+notes[i]+"','','chrome,resizable,centerscreen');");
|
||||||
box.setAttribute('class','clicky');
|
box.setAttribute('class','clicky');
|
||||||
box.appendChild(icon);
|
box.appendChild(icon);
|
||||||
box.appendChild(button);
|
box.appendChild(label);
|
||||||
|
|
||||||
var removeButton = document.createElement('label');
|
var removeButton = document.createElement('label');
|
||||||
removeButton.setAttribute("value","-");
|
removeButton.setAttribute("value","-");
|
||||||
|
|
|
@ -25,14 +25,14 @@
|
||||||
<column/>
|
<column/>
|
||||||
<column flex="1"/>
|
<column flex="1"/>
|
||||||
</columns>
|
</columns>
|
||||||
|
<rows id="editpane-dynamic-fields" flex="1"/>
|
||||||
<rows id="editpane-dynamic-fields" flex="1">
|
|
||||||
</rows>
|
|
||||||
</grid>
|
</grid>
|
||||||
</vbox>
|
</vbox>
|
||||||
<vbox>
|
<vbox flex="1">
|
||||||
<button label="New Note" oncommand="ScholarItemPane.addNote();"/>
|
<hbox align="center">
|
||||||
<label id="editpane-notes-label"/>
|
<label id="editpane-notes-label"/>
|
||||||
|
<button label="New Note" oncommand="ScholarItemPane.addNote();"/>
|
||||||
|
</hbox>
|
||||||
<grid flex="1">
|
<grid flex="1">
|
||||||
<columns>
|
<columns>
|
||||||
<column flex="1"/>
|
<column flex="1"/>
|
||||||
|
|
|
@ -6,6 +6,8 @@ var _notesField;
|
||||||
function onLoad()
|
function onLoad()
|
||||||
{
|
{
|
||||||
_notesField = document.getElementById('notes-box');
|
_notesField = document.getElementById('notes-box');
|
||||||
|
_notesField.focus();
|
||||||
|
|
||||||
var params = new Array();
|
var params = new Array();
|
||||||
var b = document.location.href.substr(document.location.href.indexOf('?')+1).split('&');
|
var b = document.location.href.substr(document.location.href.indexOf('?')+1).split('&');
|
||||||
for(var i = 0; i < b.length; i++)
|
for(var i = 0; i < b.length; i++)
|
||||||
|
@ -22,6 +24,11 @@ function onLoad()
|
||||||
_notesField.setAttribute('value',item.getNote(noteID));
|
_notesField.setAttribute('value',item.getNote(noteID));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function onUnload()
|
||||||
|
{
|
||||||
|
save();
|
||||||
|
}
|
||||||
|
|
||||||
function save()
|
function save()
|
||||||
{
|
{
|
||||||
if(noteID)
|
if(noteID)
|
||||||
|
@ -31,3 +38,4 @@ function save()
|
||||||
}
|
}
|
||||||
|
|
||||||
addEventListener("load", function(e) { onLoad(e); }, false);
|
addEventListener("load", function(e) { onLoad(e); }, false);
|
||||||
|
addEventListener("unload", function(e) { onUnload(e); }, false);
|
|
@ -13,6 +13,11 @@
|
||||||
<script src="include.js"/>
|
<script src="include.js"/>
|
||||||
<script src="note.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"/>
|
<label id="info-label"/>
|
||||||
<textbox id="notes-box" flex="1" multiline="true" type="timed" timeout="1000" oncommand="save();"/>
|
<textbox id="notes-box" flex="1" multiline="true" type="timed" timeout="1000" oncommand="save();"/>
|
||||||
</window>
|
</window>
|
|
@ -90,7 +90,7 @@ vbox #scholar-pane
|
||||||
width: 150px;
|
width: 150px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#scholar-info
|
#scholar-view-item vbox
|
||||||
{
|
{
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user