Changeset 073081 in indico
- Timestamp:
- 02/11/10 15:47:20 (3 years ago)
- Branches:
- master, burotel, hello-world-walkthrough, ipv6, new-webex, prov-dual-interface, v0.97-series, v0.98-series, v0.98.2, v0.98.3, v0.98b1, v0.98b2, v0.99, b8c30da8ebdbdcbd675a873997cc3e95f567de49, 4287315ec967a3da168d83963c14001db8487d53
- Children:
- df3d1f
- Parents:
- dab490
- Location:
- indico
- Files:
-
- 5 edited
-
MaKaC/fossils/conference.py (modified) (1 diff)
-
MaKaC/webinterface/tpls/EventModifMainData.tpl (modified) (4 diffs)
-
htdocs/js/indico/Core/Widgets/DateTime.js (modified) (1 diff)
-
htdocs/js/indico/Core/Widgets/Inline.js (modified) (3 diffs)
-
htdocs/js/indico/Core/Widgets/RichText.js (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
indico/MaKaC/fossils/conference.py
rf25f07 r073081 31 31 """Conference title""" 32 32 33 def getDescription(self): 34 """Conference description""" 35 33 36 def getLocation(self): 34 37 """ Location (CERN/...) """ -
indico/MaKaC/webinterface/tpls/EventModifMainData.tpl
r6884f0 r073081 12 12 for fact in wr.getFactoryList(): 13 13 val = fact.getId() 14 14 15 15 if val == 'simple_event': 16 16 val = 'lecture' 17 18 typeList[fact.getId()] = val 17 18 typeList[fact.getId()] = val 19 19 20 20 visibilityList = {} 21 21 topcat = confObj.getOwnerList()[0] 22 level = 0 22 level = 0 23 23 visibilityList[0] = 'Nowhere' 24 24 while topcat: 25 level += 1 25 level += 1 26 26 if topcat.getId() != "0": 27 27 from MaKaC.common.TemplateExec import truncateTitle 28 28 visibilityList[level] = truncateTitle(topcat.getName(), 50) 29 topcat = topcat.getOwner() 30 visibilityList[999] = 'Everywhere' 29 topcat = topcat.getOwner() 30 visibilityList[999] = 'Everywhere' 31 31 32 32 numRows = 11 … … 56 56 </td> 57 57 <td> 58 <div class="blacktext" id="inPlaceEditDescription"><%=description %></ span>58 <div class="blacktext" id="inPlaceEditDescription"><%=description %></div> 59 59 </td> 60 60 </tr> … … 159 159 <% if Config.getInstance().getShortEventURL() != "": %> 160 160 <td class="dataCaptionTD"> 161 <span class="dataCaptionFormat"><%= _("Short display URL")%></span> 162 </td> 163 <% if shortURL == "" : %> 164 <td class="blacktext"><em><%= _("There is not any short url yet. Click \"Modify\" to setup.")%></em></td> 161 <span class="dataCaptionFormat"><%= _("Short display URL")%></span> 162 </td> 163 <% if shortURL == "" : %> 164 <td class="blacktext"><em><%= _("There is not any short url yet. Click \"Modify\" to setup.")%></em></td> 165 165 <% end %> 166 166 <% else : %> … … 249 249 $E('inPlaceEditStartEndDate').set(new StartEndDateWidget('event.main.changeDates', <%= jsonEncode({'conference': "%s"%conferenceId}) %>, {'startDate': confFossile.startDate, 'endDate': confFossile.endDate}).draw()); 250 250 251 <%= macros.genericField(macros.FIELD_RICHTEXT, 'inPlaceEditDescription', 'event.main.changeDescription', {'conference': "%s"%conferenceId}, preCache=True, rh=self._rh, options=(600,400)) %> 251 $E('inPlaceEditDescription').set(new RichTextInlineEditWidget('event.main.changeDescription', <%= jsonEncode({'conference': "%s"%conferenceId}) %>, confFossile.description).draw()); 252 252 253 253 <% if evtType == 'conference':%> -
indico/htdocs/js/indico/Core/Widgets/DateTime.js
r6a51d1 r073081 88 88 Html.div("startEndDate", Html.span({},"ends "), 89 89 end)); 90 },91 92 _buildFrame: function(modeChooser, switchChooser) {93 return Html.div({},94 modeChooser,95 Html.div({style:{marginTop: '5px'}},96 switchChooser));97 98 90 }, 99 91 -
indico/htdocs/js/indico/Core/Widgets/Inline.js
r6a51d1 r073081 67 67 this.ready.set(false); 68 68 this.loadOnStartup = loadOnStartup; 69 this.source = indicoSource(method, attributes, false, !loadOnStartup);69 this.source = indicoSource(method, attributes, null, !loadOnStartup); 70 70 }); 71 71 … … 826 826 { 827 827 828 _buildFrame: function(modeChooser, switchChooser) { 829 return Html.div({}, 830 modeChooser, 831 Html.div({style:{marginTop: '5px'}}, 832 switchChooser)); 833 834 }, 835 828 836 _handleError: function(error) { 829 837 this._error(error); … … 878 886 }, 879 887 888 /* By default, any input is accepted */ 889 _verifyInput: function() { 890 return true; 891 }, 892 880 893 881 894 /* Enables/disables saving */ -
indico/htdocs/js/indico/Core/Widgets/RichText.js
r9033fd r073081 1 1 var executeOnload = false; 2 var __globalEditorTable = {}; 2 var __globalEditorTable = {}; 3 3 4 4 type("RichTextEditor", ["IWidget", "Accessor"], … … 22 22 postDraw: function() { 23 23 this.div.set(''); 24 24 25 25 this.div.dom.innerHTML = this.editor.CreateHtml(); 26 26 27 27 var self = this; 28 28 29 this.onLoadFunc = function() { 29 this.onLoadFunc = function() { 30 30 31 31 if (self.text) { … … 36 36 function(callback) { 37 37 callback(); 38 }); 39 40 self.editor.Events.AttachEvent( 'OnSelectionChange', 38 }); 39 40 self.editor.Events.AttachEvent( 'OnSelectionChange', 41 41 function() { 42 if (!self.observing) { 42 if (!self.observing) { 43 43 self.startObserving(); 44 44 } 45 } ) ; 45 } ) ; 46 46 }; 47 47 48 48 if (this.editor && this.editor.SetData) { 49 49 this.onLoadFunc(); … … 53 53 54 54 }, 55 55 56 56 set: function(text) { 57 57 var self = this; … … 127 127 var self = this; 128 128 129 var observeFunc = function(value) { 129 var observeFunc = function(value) { 130 130 131 131 self.plain.unbind(); … … 143 143 }; 144 144 145 this.selected.observe(observeFunc); 145 this.selected.observe(observeFunc); 146 146 observeFunc(this.selected.get()); 147 147 }, … … 234 234 { 235 235 toPlain: command( 236 toPlainFunc, 236 toPlainFunc, 237 237 $T("switch to plain text")), 238 238 toRich: command( … … 250 250 toPlainFunc(); 251 251 } 252 252 253 253 this.rich.onLoad(function() { 254 254 self.loaded = true; … … 258 258 259 259 260 type("RichTextInlineEditWidget", ["InlineEditWidget"], 261 { 262 _handleEditMode: function(value) { 263 264 this.description = new RichTextWidget(600, 400,{},'','rich','IndicoMinimal'); 265 this.description.set(value); 266 return this.description.draw(); 267 }, 268 269 _handleDisplayMode: function(value) { 270 271 var iframeId = "descFrame"; 272 var iframe = Html.iframe({id: iframeId,name: iframeId, style:{width: pixels(600), 273 height:pixels(100), 274 border: "1px dotted #ECECEC"}}); 275 276 var loadFunc = function() { 277 var doc; 278 279 if (Browser.IE) { 280 doc = document.frames[iframeId].document; 281 } else { 282 doc = $E(iframeId).dom.contentDocument; 283 } 284 if (value == "") { 285 value = '<em>No description</em>'; 286 } 287 doc.body.innerHTML = '<link href="css/Default.css" type="text/css" rel="stylesheet">' + value; 288 }; 289 290 if (Browser.IE) { 291 iframe.dom.onreadystatechange = loadFunc; 292 } else { 293 // for normal browsers 294 iframe.observeEvent("load", loadFunc); 295 } 296 297 return iframe; 298 }, 299 300 _getNewValue: function() { 301 return this.description.get(); 302 } 303 }, 304 function(method, attributes, initValue) { 305 this.InlineEditWidget(method, attributes, initValue); 306 }); 307 308 309 260 310 function FCKeditor_OnComplete( editorInstance ) 261 311 { … … 269 319 if(value.editor.IsDirty()) { 270 320 each(value.callbacks, function(func) { 271 func(); 321 func(); 272 322 }) 273 323 value.editor.ResetIsDirty();
Note: See TracChangeset
for help on using the changeset viewer.
