Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
alfresco-inboxes-how-to-use-bitmap-icons-simple-dojo-customisation
<div class="inboxes-inbox"
data-dojo-attach-event="click:clickHandler">
<div class="inboxes-inbox-counter" data-dojo-attach-point="counterNode">&nbsp;</div>
<div class="inboxes-inbox-text">
<img src="${absoluteIconPath}" style="vertical-align: bottom"/>
<span class="inboxes-inbox-title">${title}</span>
</div>
</div>
define([
'dojo/_base/declare',
'dojo/_base/lang',
'./Inbox',
'dojo/text!./templates/BitmapInbox.html'
], function (declare, lang, Inbox, template) {
return declare([Inbox], {
templateString: template,
postMixInProperties: function () {
this.inherited(arguments);
this.absoluteIconPath = lang.replace(
"{urlRescontext}components/softwareloop/inboxes/famfamfam_silk_icons_v013/icons/{iconPath}",
{
urlRescontext: Alfresco.constants.URL_RESCONTEXT,
iconPath: this.iconClass
}
);
}
});
});
<div class="inboxes-inbox"
data-dojo-attach-event="click:clickHandler">
<div class="inboxes-inbox-counter" data-dojo-attach-point="counterNode">&nbsp;</div>
<div class="inboxes-inbox-text">
<i class="inboxes-inbox-icon ${iconClass}"></i>
<span class="inboxes-inbox-title">${title}</span>
</div>
</div>
<inboxes>
<group id="my-documents">
<inbox id="drafts" iconClass="attach.png" inboxClass="softwareloop/inboxes/BitmapInbox">
<query><![CDATA[
SELECT d.*, t.*
FROM cmis:document AS d
JOIN cm:titled AS t on d.cmis:objectId = t.cmis:objectId
WHERE contains(d, 'PATH:"/app:company_home/st:sites/cm:swsdp/cm:documentLibrary/cm:Meeting_x0020_Notes/*"')
]]></query>
</inbox>
<inbox id="for-my-approval" iconClass="accept.png" inboxClass="softwareloop/inboxes/BitmapInbox">
<query><![CDATA[
SELECT d.*, t.*
FROM cmis:document AS d
JOIN cm:titled AS t on d.cmis:objectId = t.cmis:objectId
WHERE contains(d, 'PATH:"/app:company_home/st:sites/cm:swsdp/cm:documentLibrary/cm:Budget_x0020_Files/cm:Invoices/*"')
]]></query>
</inbox>
<inbox id="overdue" iconClass="clock.png" inboxClass="softwareloop/inboxes/BitmapInbox">
<query><![CDATA[
SELECT d.*, t.*
FROM cmis:document AS d
JOIN cm:titled AS t on d.cmis:objectId = t.cmis:objectId
WHERE contains(d, 'PATH:"/app:company_home/st:sites/cm:swsdp/cm:documentLibrary/cm:Agency_x0020_Files/cm:Contracts/*"')
]]></query>
</inbox>
<inbox id="high-priority" iconClass="flag_red.png" inboxClass="softwareloop/inboxes/BitmapInbox">
<query><![CDATA[
SELECT d.*, t.*
FROM cmis:document AS d
JOIN cm:titled AS t on d.cmis:objectId = t.cmis:objectId
WHERE contains(d, 'PATH:"/app:company_home/st:sites/cm:swsdp/cm:documentLibrary/cm:Agency_x0020_Files/cm:Mock-Ups/*"')
]]></query>
</inbox>
</group>
<group id="archive">
<inbox id="invoices" iconClass="page.png" inboxClass="softwareloop/inboxes/BitmapInbox">
<query><![CDATA[
SELECT d.*, t.*
FROM cmis:document AS d
JOIN cm:titled AS t on d.cmis:objectId = t.cmis:objectId
WHERE d.cmis:objectTypeId='cmis:document'
AND d.cmis:createdBy = 'mjackson'
]]></query>
</inbox>
<inbox id="purchase-orders" iconClass="arrow_left.png" inboxClass="softwareloop/inboxes/BitmapInbox">
<query><![CDATA[
SELECT d.*, t.*
FROM cmis:document AS d
JOIN cm:titled AS t on d.cmis:objectId = t.cmis:objectId
WHERE d.cmis:objectTypeId='cmis:document'
AND d.cmis:createdBy = 'abeecher'
]]></query>
</inbox>
<inbox id="quotations" iconClass="arrow_right.png" inboxClass="softwareloop/inboxes/BitmapInbox">
<query><![CDATA[
SELECT d.*, t.*
FROM cmis:document AS d
JOIN cm:titled AS t on d.cmis:objectId = t.cmis:objectId
WHERE contains(d, 'PATH:"/app:company_home/st:sites/cm:swsdp/cm:documentLibrary/cm:Presentations/*"')
]]></query>
</inbox>
<inbox id="marketing-documents" iconClass="world.png" inboxClass="softwareloop/inboxes/BitmapInbox">
<query><![CDATA[
SELECT d.*, t.*
FROM cmis:document AS d
JOIN cm:titled AS t on d.cmis:objectId = t.cmis:objectId
WHERE contains(d, 'PATH:"/app:company_home/st:sites/cm:swsdp/cm:documentLibrary/cm:Agency_x0020_Files/cm:Images/*"')
]]></query>
</inbox>
</group>
</inboxes>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment