Changeset 117
- Timestamp:
- 11/29/07 15:15:24 (1 year ago)
- Files:
-
- MediAnnotateXPI/trunk/ma.xpi (added)
- MediAnnotateXPI/trunk/srcExtension/chrome.manifest (modified) (1 diff)
- MediAnnotateXPI/trunk/srcExtension/chrome/MediAnnotate/content/SMediAnnotate.jar (added)
- MediAnnotateXPI/trunk/srcExtension/chrome/MediAnnotate/content/SVideAnnotate.jar (deleted)
- MediAnnotateXPI/trunk/srcExtension/chrome/MediAnnotate/content/itemPane.xul (modified) (1 diff)
- MediAnnotateXPI/trunk/srcExtension/chrome/MediAnnotate/content/mediannotate.xul (modified) (2 diffs)
- MediAnnotateXPI/trunk/srcExtension/chrome/MediAnnotate/content/overlay.js (modified) (12 diffs)
- MediAnnotateXPI/trunk/srcExtension/chrome/MediAnnotate/content/overlay.xul (modified) (2 diffs)
- MediAnnotateXPI/trunk/srcExtension/install.rdf (modified) (1 diff)
- MediAnnotateXPI/trunk/update_videannotate.rdf (modified) (1 diff)
- MediAnnotateXPI/trunk/va.xpi (deleted)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
MediAnnotateXPI/trunk/srcExtension/chrome.manifest
r64 r117 1 content videannotate chrome/videannotate/content/1 content mediannotate chrome/mediannotate/content/ 2 2 3 overlay chrome://browser/content/browser.xul chrome:// videannotate/content/overlay.xul3 overlay chrome://browser/content/browser.xul chrome://mediannotate/content/overlay.xul 4 4 5 overlay chrome://zotero/content/itemPane.xul chrome:// videannotate/content/itemPane.xul6 overlay chrome://zotero/content/overlay.xul chrome:// videannotate/content/overlay.xul5 overlay chrome://zotero/content/itemPane.xul chrome://mediannotate/content/itemPane.xul 6 overlay chrome://zotero/content/overlay.xul chrome://mediannotate/content/overlay.xul 7 7 8 skin videannotate global chrome/videannotate/skin/global/9 locale videannotate en-US chrome/videannotate/locale/en-US/8 skin mediannotate global chrome/mediannotate/skin/global/ 9 locale mediannotate en-US chrome/mediannotate/locale/en-US/ MediAnnotateXPI/trunk/srcExtension/chrome/MediAnnotate/content/itemPane.xul
r75 r117 1 1 <?xml version="1.0"?> 2 <overlay id=" videannotate-overlay-z"2 <overlay id="mediannotate-overlay-z" 3 3 xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> 4 <!-- <script src="chrome:// videannotate/content/overlay.js"/> -->4 <!-- <script src="chrome://mediannotate/content/overlay.js"/> --> 5 5 6 6 <button 7 7 id="zotero-go-to-url" 8 oncommand=" videannotate.isVideAnnotateCompatibleItem?videannotate.workItOut(event):ZoteroItemPane.onViewClick(this, event)"8 oncommand="mediannotate.isMediAnnotateCompatibleItem?mediannotate.workItOut(event):ZoteroItemPane.onViewClick(this, event)" 9 9 /> 10 10 MediAnnotateXPI/trunk/srcExtension/chrome/MediAnnotate/content/mediannotate.xul
r114 r117 1 1 <?xml version="1.0"?> 2 2 <window xmlns="http://www.w3.org/1999/xhtml" 3 title=" videannotate">4 <script type="application/x-javascript" src="chrome:// videannotate/content/file.js" />3 title="mediannotate"> 4 <script type="application/x-javascript" src="chrome://mediannotate/content/file.js" /> 5 5 6 6 <center><p id="applet-holder" xmlns="http://www.w3.org/1999/xhtml"> … … 32 32 } 33 33 34 var result = "<object id=' VA-applet' type='application/x-java-applet' width='533' height='400'>\n" +35 " <param name='code' value='org. videannotate.app.VideoAnnotater'/>" +34 var result = "<object id='MA-applet' type='application/x-java-applet' width='533' height='400'>\n" + 35 " <param name='code' value='org.mediannotate.app.MediAnnotater'/>" + 36 36 " <param name='archive' \n" + 37 " value='S VideAnnotate.jar'/>\n" +37 " value='SMediAnnotate.jar'/>\n" + 38 38 " <param name='url' value='" + url + "'/>\n" + 39 39 (mediannotate?" <param name='mediannotate' value='" + mediannotate + "'/>\n":"") + MediAnnotateXPI/trunk/srcExtension/chrome/MediAnnotate/content/overlay.js
r103 r117 1 var videannotate = {1 var mediannotate = { 2 2 onLoad: function() { 3 3 // initialization code … … 5 5 }, 6 6 7 prepare VideAnnotate: function() {7 prepareMediAnnotate: function() { 8 8 var extensionMatch = /^.*((mpg)|(avi)|(mov))$/i; 9 9 var itemId = ZoteroPane.getSelectedItems(true)[0]; … … 13 13 //Let's init things to blank and let real decisions be made later if necessary. 14 14 this.parentItem = false; 15 document.getElementById(' VA-menu-item').hidden=true;15 document.getElementById('MA-menu-item').hidden=true; 16 16 this.current_url = false; 17 this.is VideAnnotateCompatibleItem = false;17 this.isMediAnnotateCompatibleItem = false; 18 18 this.isMediaAnnotation = false; 19 19 … … 27 27 } else if(this.item.getField('url').match(extensionMatch)) { 28 28 this.current_url = this.item.getField('url'); 29 this.is VideAnnotateCompatibleItem = true;29 this.isMediAnnotateCompatibleItem = true; 30 30 this.parentItem = this.item; 31 31 … … 35 35 this.parentItem = Zotero.Items.get(this.item.getSource()); 36 36 this.current_url = this.parentItem.getField('url'); 37 this.prepare VAEntryView(this.item);38 } 39 40 if(this.isMediaAnnotation || this.is VideAnnotateCompatible) {41 document.getElementById(' VA-menu-item').hidden=false;37 this.prepareMAEntryView(this.item); 38 } 39 40 if(this.isMediaAnnotation || this.isMediAnnotateCompatible) { 41 document.getElementById('MA-menu-item').hidden=false; 42 42 document.getElementById("zotero-items-tree").ondblclick = function ondblclick(event) { 43 videannotate.workItOut(event);43 mediannotate.workItOut(event); 44 44 } 45 45 … … 66 66 } 67 67 }, 68 69 prepare VAEntryView: function(item) {68 69 prepareMAEntryView: function(item) { 70 70 var xmlString = item.getNote(); 71 71 var objDOMParser = new DOMParser(); … … 73 73 this.xmlDoc = xmlDoc; 74 74 75 document.getElementById(' va-description').value = this.xmlDoc.evaluate("//description", this.xmlDoc, null, XPathResult.ANY_TYPE, null).iterateNext().textContent;76 document.getElementById(' va-start-time').value = this.xmlDoc.evaluate("//start", this.xmlDoc, null, XPathResult.ANY_TYPE, null).iterateNext().textContent;77 document.getElementById(' va-end-time').value = this.xmlDoc.evaluate("//end", this.xmlDoc, null, XPathResult.ANY_TYPE, null).iterateNext().textContent;78 document.getElementById(' va-itemRef').value = item.getID();75 document.getElementById('ma-description').value = this.xmlDoc.evaluate("//description", this.xmlDoc, null, XPathResult.ANY_TYPE, null).iterateNext().textContent; 76 document.getElementById('ma-start-time').value = this.xmlDoc.evaluate("//start", this.xmlDoc, null, XPathResult.ANY_TYPE, null).iterateNext().textContent; 77 document.getElementById('ma-end-time').value = this.xmlDoc.evaluate("//end", this.xmlDoc, null, XPathResult.ANY_TYPE, null).iterateNext().textContent; 78 document.getElementById('ma-itemRef').value = item.getID(); 79 79 80 80 //This is a silly way of doing things. 81 81 //document.getElementById('zotero-item-pane-content').selectedIndex = 4; 82 82 //Below is the correct way (or at least a much better way). 83 var VAPanel = document.getElementById('zotero-view-VA');84 document.getElementById('zotero-item-pane-content').selectedPanel = VAPanel;83 var MAPanel = document.getElementById('zotero-view-MA'); 84 document.getElementById('zotero-item-pane-content').selectedPanel = MAPanel; 85 85 86 86 //Load tags into the popup scrollbar … … 91 91 applyChange: function() { 92 92 if(this.isSaveable) { 93 var item = Zotero.Items.get(document.getElementById(' va-itemRef').value);94 var newNote = "<mediannotate><description>" + document.getElementById(' va-description').value + "</description>\n" +95 "<start>" + document.getElementById(' va-start-time').value + "</start>\n" +96 "<end>" + document.getElementById(' va-end-time').value + "</end></mediannotate>";93 var item = Zotero.Items.get(document.getElementById('ma-itemRef').value); 94 var newNote = "<mediannotate><description>" + document.getElementById('ma-description').value + "</description>\n" + 95 "<start>" + document.getElementById('ma-start-time').value + "</start>\n" + 96 "<end>" + document.getElementById('ma-end-time').value + "</end></mediannotate>"; 97 97 item.updateNote(newNote); 98 var title = document.getElementById(' va-start-time').value + " - " + document.getElementById('va-end-time').value + " " + Zotero.Notes.noteToTitle(document.getElementById('va-description').value);98 var title = document.getElementById('ma-start-time').value + " - " + document.getElementById('ma-end-time').value + " " + Zotero.Notes.noteToTitle(document.getElementById('ma-description').value); 99 99 item.setField(110, title, false); 100 100 item.save(); … … 105 105 var newID = this._addMediaAnnotation("0 - 0 ", this.parentItem.getID(), "", 12); 106 106 this.item = Zotero.Items.get(newID); 107 var myApplet = content.document.getElementById(' VA-applet');107 var myApplet = content.document.getElementById('MA-applet'); 108 108 109 109 … … 113 113 this.item.updateNote(newNote); 114 114 ZoteroPane.selectItem(newID); 115 var title = document.getElementById(' va-start-time').value + " - " + document.getElementById('va-end-time').value + " " + Zotero.Notes.noteToTitle(document.getElementById('va-description').value);115 var title = document.getElementById('ma-start-time').value + " - " + document.getElementById('ma-end-time').value + " " + Zotero.Notes.noteToTitle(document.getElementById('ma-description').value); 116 116 this.item.setField(110, title, false); 117 117 this.item.save(); … … 128 128 129 129 workItOut: function(event) { 130 var url = "chrome:// videannotate/content/videannotate.xul?url=" + this.current_url;130 var url = "chrome://mediannotate/content/mediannotate.xul?url=" + this.current_url; 131 131 if(this.isMediaAnnotation) { 132 132 var flatnote = this.item.getNote().replace('\n', ' '); … … 199 199 }; 200 200 201 window.addEventListener("load", function(e) { videannotate.onLoad(e); }, false);201 window.addEventListener("load", function(e) { mediannotate.onLoad(e); }, false); MediAnnotateXPI/trunk/srcExtension/chrome/MediAnnotate/content/overlay.xul
r103 r117 1 1 <?xml version="1.0"?> 2 <overlay id=" videannotate-overlay-z"2 <overlay id="mediannotate-overlay-z" 3 3 xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> 4 <script src="chrome:// videannotate/content/tags.js"/>5 <script src="chrome:// videannotate/content/overlay.js"/>4 <script src="chrome://mediannotate/content/tags.js"/> 5 <script src="chrome://mediannotate/content/overlay.js"/> 6 6 7 7 8 8 <button 9 9 id="zotero-attachment-view" 10 oncommand=" videannotate.isVideAnnotateCompatibleItem?videannotate.workItOut(event):ZoteroPane.viewSelectedAttachment(event);"/>10 oncommand="mediannotate.isMediAnnotateCompatibleItem?mediannotate.workItOut(event):ZoteroPane.viewSelectedAttachment(event);"/> 11 11 12 12 <tree 13 13 id="zotero-items-tree" 14 onselect="ZoteroPane.itemSelected(); videannotate.prepareVideAnnotate();" />14 onselect="ZoteroPane.itemSelected();mediannotate.prepareMediAnnotate();" /> 15 15 16 16 <!-- This is debug code to find stuff --> 17 17 <deck id="zotero-item-pane-content"> 18 <vbox id="zotero-view- VA" flex="1">19 <button id=" va-view-button" label="View in VideAnnotate" oncommand="videannotate.workItOut(event)"/>20 <hbox id=" va-time-indicators" flex="0">21 <textbox id=" va-start-time" rows="1" cols="8" onchange="videannotate.applyChange()"/>22 <textbox id=" va-end-time" rows="1" cols="8" onchange="videannotate.applyChange()"/>18 <vbox id="zotero-view-MA" flex="1"> 19 <button id="ma-view-button" label="View in MediAnnotate" oncommand="mediannotate.workItOut(event)"/> 20 <hbox id="ma-time-indicators" flex="0"> 21 <textbox id="ma-start-time" rows="1" cols="8" onchange="mediannotate.applyChange()"/> 22 <textbox id="ma-end-time" rows="1" cols="8" onchange="mediannotate.applyChange()"/> 23 23 </hbox> 24 <textbox id=" va-description" rows="8" cols="25" multiline="true" onchange="videannotate.applyChange()"/>25 <label id=" va-itemRef" hidden="true" />24 <textbox id="ma-description" rows="8" cols="25" multiline="true" onchange="mediannotate.applyChange()"/> 25 <label id="ma-itemRef" hidden="true" /> 26 26 <label id="ma-TagsLabel" class="zotero-clicky" value="Tags: [click here]" crop="end" onclick="mediannotate_tags.showPopup();"/> 27 27 <!-- ignorekeys="true" lets us have input fields in the popup, a useful thing to know. --> … … 48 48 49 49 <popup id="zotero-itemmenu" onpopupshowing="ZoteroPane.buildItemContextMenu();"> 50 <menuitem id=" VA-menu-item" label="Add Media Annotation" hidden="true" oncommand="videannotate.addMediaAnnotation();"/>50 <menuitem id="MA-menu-item" label="Add Media Annotation" hidden="true" oncommand="mediannotate.addMediaAnnotation();"/> 51 51 </popup> 52 52 MediAnnotateXPI/trunk/srcExtension/install.rdf
r104 r117 5 5 <em:id>videannotate@htmlweb.com</em:id> 6 6 <em:name>MediAnnotate</em:name> 7 <em:version>0.6.0. 5</em:version>8 <em:creator>Stuart Thiel Concordia University University</em:creator>7 <em:version>0.6.0.6</em:version> 8 <em:creator>Stuart Thiel Concordia University University</em:creator> 9 9 <em:developer>Stuart Thiel</em:developer> 10 <em:homepageURL>http:// videannotate.htmlweb.com/trac/</em:homepageURL>11 <em:updateURL>http:// videannotate.htmlweb.com/trac/browser/VideAnnotateXPI/trunk/update_videannotate.rdf?format=raw</em:updateURL>10 <em:homepageURL>http://mediannotate.htmlweb.com/trac/</em:homepageURL> 11 <em:updateURL>http://mediannotate.htmlweb.com/trac/browser/MediAnnotateXPI/trunk/update_mediannotate.rdf?format=raw</em:updateURL> 12 12 <em:type>2</em:type> <!-- type=extension --> 13 13 MediAnnotateXPI/trunk/update_videannotate.rdf
r104 r117 14 14 <minVersion>2.0</minVersion> 15 15 <maxVersion>2.0.0.*</maxVersion> 16 <updateLink>http:// videannotate.htmlweb.com/trac/browser/VideAnnotateXPI/trunk/va.xpi?format=raw</updateLink>16 <updateLink>http://mediannotate.htmlweb.com/trac/browser/MediAnnotateXPI/trunk/ma.xpi?format=raw</updateLink> 17 17 </RDF:Description> 18 18 </targetApplication>
