1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
| define(['dojo/_base/declare',
| 'dojo/_base/lang',
| 'dojo/_base/html',
| 'dijit/_WidgetBase',
| './utils'
| ],
| function(declare, lang, html, _WidgetBase, utils) {
| return declare(_WidgetBase, {
| 'class': 'jimu-widget-placeholder',
|
| postCreate: function(){
| this.inherited(arguments);
| this.indexNode = html.create('div', {
| 'class': 'inner',
| innerHTML: this.index
| }, this.domNode);
| html.setAttr(this.domNode, 'title', window.jimuNls.widgetPlaceholderTooltip);
| },
|
| moveTo: function(position){
| var style = {
| left: 'auto',
| right: 'auto',
| bottom: 'auto',
| top: 'auto',
| width: 'auto',
| height: 'auto'
| };
| style = lang.mixin(style, utils.getPositionStyle(position));
| //we don't change width and height through layout
| delete style.width;
| delete style.height;
| html.setStyle(this.domNode, style);
| },
|
| setIndex: function(index){
| this.index = index;
| this.indexNode.innerHTML = index;
| }
| });
| });
|
|