def renderEditButtons(self): """ Returns an XHTML string for the edit buttons """ html = common.submitImage(u"done", self.id, u"/images/stock-apply.png", _(u"Done"),1) html += common.confirmThenSubmitImage( _(u"This will delete this iDevice." u"\\n" u"Do you really want to do this?"), u"delete", self.id, u"/images/stock-cancel.png", _(u"Delete"), 1) if self.idevice.isFirst(): html += common.image(u"movePrev", u"/images/stock-go-up-off.png") else: html += common.submitImage(u"movePrev", self.id, u"/images/stock-go-up.png", _(u"Move Up"),1) if self.idevice.isLast(): html += common.image(u"moveNext", u"/images/stock-go-down-off.png") else: html += common.submitImage(u"moveNext", self.id, u"/images/stock-go-down.png", _(u"Move Down"),1) options = [(_(u"---Move To---"), "")] options += self.__getNodeOptions(self.package.root, 0) html += common.select(u"move", self.id, options) if self.purpose.strip() or self.tip.strip(): html += u'<a title="%s" ' % _(u'Pedagogical Help') html += u'onmousedown="Javascript:updateCoords(event);" ' html += u"onclick=\"Javascript:showMe('p"+self.id+"', 420, 240);\" " html += u'href="Javascript:void(0)" style="cursor:help;"> ' html += u'<img alt="%s" class="info" src="/images/info.png" ' \ % _('Information') html += u'style="align:middle;" /></a>\n' html += u'<div id="p%s" style="display:none;">' % self.id html += u'<div style="float:right;">' html += u'<img alt="%s" src="/images/stock-stop.png" ' % _('Close') html += u' title="%s" ' % _(u"Close") html += u'onmousedown="Javascript:hideMe();"/></div>' if self.purpose != "": html += u'<div class="popupDivLabel">' html += u' ' + _(u"Purpose") + u'</div>' html += self.purpose if self.tip != "": html += u'<div class="block"><b>' + _(u"Tip:") + u'</b></div>' html += self.tip html += u'\n' html += u'</div><br/><br/>\n' return html
def renderEditButtons(self, undo=True): """ Returns an XHTML string for the edit buttons """ html = common.submitImage(u"done", self.id, u"/images/stock-apply.png", _(u"Done"), 1) if undo: html += common.submitImage(u"cancel", self.id, u"/images/stock-undo.png", _(u"Undo Edits"), 1) else: html += common.submitImage(u"no_cancel", self.id, u"/images/stock-undoNOT.png", _(u"Can NOT Undo Edits"), 1) html += common.confirmThenSubmitImage( _(u"This will delete this iDevice." u"\\n" u"Do you really want to do this?"), u"delete", self.id, u"/images/stock-cancel.png", _(u"Delete"), 1) if self.idevice.isFirst(): html += common.image(u"movePrev", u"/images/stock-go-up-off.png") else: html += common.submitImage(u"movePrev", self.id, u"/images/stock-go-up.png", _(u"Move Up"), 1) if self.idevice.isLast(): html += common.image(u"moveNext", u"/images/stock-go-down-off.png") else: html += common.submitImage(u"moveNext", self.id, u"/images/stock-go-down.png", _(u"Move Down"), 1) options = [(_(u"---Move To---"), "")] options += self.__getNodeOptions(self.package.root, 0) html += common.select(u"move", self.id, options) if self.purpose.strip() or self.tip.strip(): html += u'<a title="%s" ' % _(u'Pedagogical Help') html += u'onmousedown="Javascript:updateCoords(event);" ' html += u"onclick=\"Javascript:showMe('p" + self.id + "', 420, 240);\" " html += u'href="Javascript:void(0)" style="cursor:help;"> ' html += u'<img alt="%s" class="info" src="/images/info.png" ' \ % _('Information') html += u'style="align:middle;" /></a>\n' html += u'<div id="p%s" style="display:none;">' % self.id html += u'<div style="float:right;">' html += u'<img alt="%s" src="/images/stock-stop.png" ' % _('Close') html += u' title="%s" ' % _(u"Close") html += u'onmousedown="Javascript:hideMe();"/></div>' if self.purpose != "": html += u'<div class="popupDivLabel">' html += u' ' + _(u"Purpose") + u'</div>' html += self.purpose if self.tip != "": html += u'<div class="block"><b>' + _(u"Tip:") + u'</b></div>' html += self.tip html += u'\n' html += u'</div><br/><br/>\n' return html
def renderEditButtons(self, undo=True): """ Returns an XHTML string for the edit buttons """ html = common.submitImage(u"done", self.id, u"/images/stock-apply.png", _(u"Done"),1) if undo: html += common.confirmThenSubmitImage( _(u"Exit without saving?"), u"cancel", self.id, u"/images/stock-undo.png", _(u"Undo Edits"), 1) else: html += common.submitImage(u"no_cancel", self.id, u"/images/stock-undoNOT.png", _(u"Can NOT Undo Edits"),1) html += common.confirmThenSubmitImage( _(u"This will delete this iDevice. Do you really want to do this?"), u"delete", self.id, u"/images/stock-cancel.png", _(u"Delete"), 1) if self.idevice.isFirst(): html += common.image(u"movePrev", u"/images/stock-go-up-off.png", 16, 16, None, u"submit") else: html += common.submitImage(u"movePrev", self.id, u"/images/stock-go-up.png", _(u"Move Up"),1) if self.idevice.isLast(): html += common.image(u"moveNext", u"/images/stock-go-down-off.png", 16, 16, None, u"submit") else: html += common.submitImage(u"moveNext", self.id, u"/images/stock-go-down.png", _(u"Move Down"),1) options = [(_(u"---Move To---"), "")] options += self.__getNodeOptions(self.package.root, 0) html += common.select(u"move", self.id, options) if self.purpose.strip() or self.tip.strip(): html += u'<a title="%s" ' % _(u'Pedagogical Help') html += u"onclick=\"showMessageBox('"+self.id+"');\" " html += u'href="javascript:void(0)" style="cursor:help;margin-left:.2em;">' html += u'<img alt="%s" class="info" src="/images/info.png" ' \ % _('Information') html += u'style="align:middle;" /></a>\n' html += u'<div style="display:none;">' if self.purpose != "": html += u'<div id="'+self.id+'title">'+_(u"Purpose")+'</div>' html += u'<div id="'+self.id+'content">'+self.purpose+'</div>' if self.tip != "": html += u'<div id="'+self.id+'title">'+_(u"Tip:")+'</div>' html += u'<div id="'+self.id+'content">'+self.tip+'</div>' html += u'</div>\n' return html
def renderEditButtons(self, undo=True): """ Returns an XHTML string for the edit buttons """ html = "<br></br>" #Added this so there is space between end of Idevice page and the icons at the botton when authoring html += common.submitImage(u"done", self.id, #u"/images/stock-apply.png", u"/images/dialog-ok-apply-2.png", _(u"Done"),1) html +=" " #Added if undo: html += common.submitImage(u"cancel", self.id, #u"/images/stock-undo.png", u"/images/edit-undo-5.png", _(u"Undo Edits"),1) html +=" " #Added else: html += common.submitImage(u"no_cancel", self.id, u"/images/stock-undoNOT.png", _(u"Can NOT Undo Edits"),1) html +=" " #Added html += common.confirmThenSubmitImage( _(u"This will delete this iDevice. Do you really want to do this?"), u"delete", #self.id, u"/images/stock-cancel.png", self.id, u"/images/dialog-cancel-3.png", _(u"Delete"), 1) html +=" " #Added if self.idevice.isFirst(): html += common.image(u"movePrev", u"/images/draw-arrow-up-off.png", alt=None, cssClass=u"submit") html +=" " else: html += common.submitImage(u"movePrev", self.id, u"/images/draw-arrow-up.png", _(u"Move Up"),1) html +=" " if self.idevice.isLast(): html += common.image(u"moveNext", u"/images/draw-arrow-down-off.png", alt=None, cssClass=u"submit") html +=" " else: html += common.submitImage(u"moveNext", self.id, u"/images/draw-arrow-down.png", _(u"Move Down"),1) html +=" " html += "<br></br>" #There is no space, line between the finish icons in page and Move To option. options = [(_(u"---Move To---"), "")] options += self.__getNodeOptions(self.package.root, 0) html += common.select(u"move", self.id, options) if self.purpose.strip() or self.tip.strip(): html += u'<a title="%s" ' % _(u'Pedagogical Help') html += u'onmousedown="Javascript:updateCoords(event);" ' html += u"onclick=\"Javascript:showMe('p"+self.id+"', 420, 240);\" " html += u'href="Javascript:void(0)" style="cursor:help;"> ' html += u'<img alt="%s" class="info" src="/images/info.png" ' \ % _('Information') html += u'style="align:middle;" /></a>\n' html += u'<div id="p%s" style="display:none;">' % self.id html += u'<div style="float:right;">' html += u'<img alt="%s" src="/images/stock-stop.png" ' % _('Close') html += u' title="%s" ' % _(u"Close") html += u'onmousedown="Javascript:hideMe();"/></div>' if self.purpose != "": html += u'<div class="popupDivLabel">' html += u' ' + _(u"Purpose") + u'</div>' html += self.purpose if self.tip != "": html += u'<div class="block"><b>' + _(u"Tip:") + u'</b></div>' html += self.tip html += u'\n' html += u'</div><br/><br/>\n' return html