From cebd6bde5b3e5184eb53e6efa9967fac5f5db284 Mon Sep 17 00:00:00 2001 From: David Norton Date: Fri, 9 Jun 2006 16:36:18 +0000 Subject: [PATCH] [interface] Images now appear on the collections tree and items tree. (yes, they are ugly). --- .../content/scholar/collectionTreeView.js | 7 ++++++- .../chromeFiles/content/scholar/itemTreeView.js | 12 ++++++++++-- .../skin/default/scholar/treeitem-book.png | Bin 0 -> 1096 bytes .../default/scholar/treeitem-journalArticle.png | Bin 0 -> 544 bytes .../default/scholar/treesource-collection.png | Bin 0 -> 399 bytes .../skin/default/scholar/treesource-library.png | Bin 0 -> 171 bytes 6 files changed, 16 insertions(+), 3 deletions(-) create mode 100644 chrome/chromeFiles/skin/default/scholar/treeitem-book.png create mode 100644 chrome/chromeFiles/skin/default/scholar/treeitem-journalArticle.png create mode 100644 chrome/chromeFiles/skin/default/scholar/treesource-collection.png create mode 100644 chrome/chromeFiles/skin/default/scholar/treesource-library.png diff --git a/chrome/chromeFiles/content/scholar/collectionTreeView.js b/chrome/chromeFiles/content/scholar/collectionTreeView.js index 059a04a954..9de2a9d251 100644 --- a/chrome/chromeFiles/content/scholar/collectionTreeView.js +++ b/chrome/chromeFiles/content/scholar/collectionTreeView.js @@ -119,6 +119,12 @@ Scholar.CollectionTreeView.prototype.getCellText = function(row, column) return ""; } +Scholar.CollectionTreeView.prototype.getImageSrc = function(row, col) +{ + var collectionType = this._getItemAtRow(row).type; + return "chrome://scholar/skin/treesource-" + collectionType + ".png"; +} + Scholar.CollectionTreeView.prototype.isContainer = function(row) { return this._getItemAtRow(row).isCollection(); @@ -331,7 +337,6 @@ Scholar.CollectionTreeView.prototype.isEditable = function(row, idx) { retur Scholar.CollectionTreeView.prototype.getRowProperties = function(row, prop) { } Scholar.CollectionTreeView.prototype.getColumnProperties = function(col, prop) { } Scholar.CollectionTreeView.prototype.getCellProperties = function(row, col, prop) { } -Scholar.CollectionTreeView.prototype.getImageSrc = function(row, col) { } Scholar.CollectionTreeView.prototype.performAction = function(action) { } Scholar.CollectionTreeView.prototype.performActionOnCell = function(action, row, col) { } Scholar.CollectionTreeView.prototype.getProgressMode = function(row, col) { } diff --git a/chrome/chromeFiles/content/scholar/itemTreeView.js b/chrome/chromeFiles/content/scholar/itemTreeView.js index fc92ed2085..faee64f94c 100644 --- a/chrome/chromeFiles/content/scholar/itemTreeView.js +++ b/chrome/chromeFiles/content/scholar/itemTreeView.js @@ -122,6 +122,15 @@ Scholar.ItemTreeView.prototype.getCellText = function(row, column) return val; } +Scholar.ItemTreeView.prototype.getImageSrc = function(row, col) +{ + if(col.id == 'title') + { + var itemType = Scholar.ItemTypes.getTypeName(this._getItemAtRow(row).getType()); + return "chrome://scholar/skin/treeitem-"+itemType+".png"; + } +} + Scholar.ItemTreeView.prototype.isSorted = function() { for(var i=0, len=this._treebox.columns.count; iNn~YUU}gyL332`Z|Nrmbzn3mqmY$lv zYSqer|Nedb`fc{y`Oc2+UN){)M&=O_kyoxYUvyn z9K3AlQY#B9Gc|*jwCar1tiON%E?v6P+0r@EJ;cSrF(x8r$BrG1^-Y%gmfh*K$ER%F z)v+QqF}1R)A;~*7Gbm9^K(w>7v$>yqfmn6lE!Sg$Z&Yj+J<@uaSd!tDoyl`EQ`)RIb~~WVr5!tVr5yCje)hSh=Q8DW`bAj%IcZU zhIW-j74P1?n?7}hshVN3XIMpCc3)oef!=jlK8cnlR%g$g*}Zd@f`pW*zNv|}iJz&* z+@fB672V$M-tXVPKYIAEqou{!-ri74*HBeEFC*jSi|4>-8U^$Wf%U>GGJ*CnmIV0) zGdMiEkp|@K^K@|xskoJ#(7>dYCdS5+@chA(N6#KUZT`T*(%Rzca`cF*ila@YWTa&! ztE+0NXsD?|c&u};JP=T@H_@?C64H`qed2!n$g!i%J2^W& z9qNj_vZ8h|UTEq$qch=iQPJm5+&ny7-Cf=X`t)_R*RR;Je$~3h>UH}TZd@sOijCni WhvvSpS)rh^g2B_(&t;ucLK6VGAtx~a literal 0 HcmV?d00001 diff --git a/chrome/chromeFiles/skin/default/scholar/treeitem-journalArticle.png b/chrome/chromeFiles/skin/default/scholar/treeitem-journalArticle.png new file mode 100644 index 0000000000000000000000000000000000000000..9c3f25a218e50765a825084edfd5dbc090ccca41 GIT binary patch literal 544 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJbFq_W2nPqp?T7vkfZS;TJ|V9E z|Noz};p&tX=ey@0Z<%oj$o=u>-ZEpLbqMY;GaOOLy!300mV`Tq8cw|O)SaG&r=A= z%uQu5u+%p)&^Ivo_QLcOP{jmK7srr_IkqRSi!~XDxLmxE;pOe1=_a5eA#mjXf6K_? z#h=T*85}z|UFUpvP~MElvIAK=O(zJOxbIZfxG?Qg?N0V78N0({Z!@jSzTNkD*F1NH z>(Z56RtL@&`LuUEn4Wlrc~$*!seoYjz%%Rz?%tWxEqGx@bVmx44bv{yN#__uFU?)@ nlIg|#DE`OUv+kd6->CoO8E;YD(yBQ?w=sCS`njxgN@xNA?==_I literal 0 HcmV?d00001 diff --git a/chrome/chromeFiles/skin/default/scholar/treesource-collection.png b/chrome/chromeFiles/skin/default/scholar/treesource-collection.png new file mode 100644 index 0000000000000000000000000000000000000000..c6613f54cdc4f3dc84f4e6c763a8c1ed7f9fa935 GIT binary patch literal 399 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJbFq_W2nPqp?T7vkfZUJ(pAgso z|NmcH(eVGzlm9>O{ri67-^Vlm-W~h;=JMay`~SY!36wg&toqEN(v$P^kIqgzG(B$r zl*ql4LU#4}?&$H@*5$IL-F{Q6^@bLUb&W=A>h)LEXsxJHeYact9MF83k|4ie24kQN zIDnbrYmhrQ3p^r=85p>QK$!8;-MT+OLDdr1h?3y^w370~qErUo#N?v<+|-oJLS?-v|XG0|S%xvNh*{8pJ>voQqNuOEUBG6hbm{QyB~_^^FYl4NShhFg*oS z5$@^Y7*a7O^}Hohg94As#RhIELyl9g{=U!jVqX8}D$fB2#o+x7ZGX9>&hkv$y@&rh z^NLoBwqzlp8<8h!H4?-Z9@xnxnjtK8L9d{|#_+?D8AU7K%AWsbw<(_W%|&^S)j%s4 NJYD@<);T3K0RV(4un7PF literal 0 HcmV?d00001 diff --git a/chrome/chromeFiles/skin/default/scholar/treesource-library.png b/chrome/chromeFiles/skin/default/scholar/treesource-library.png new file mode 100644 index 0000000000000000000000000000000000000000..6b70306639e6f5075d9cbeca945330df86f586f0 GIT binary patch literal 171 zcmeAS@N?(olHy`uVBq!ia0vp^{6Ngd!3HEhbh*6;Qk(@Ik;Oo