Showing
1 changed file
with
23 additions
and
0 deletions
| ... | ... | @@ -5918,6 +5918,27 @@ App.prototype.updateButtonContainer = function() |
| 5918 | 5918 | { |
| 5919 | 5919 | if (this.shareButton == null) |
| 5920 | 5920 | { |
| 5921 | + // TODO thingsKit 锁定 / 解锁 按钮 | |
| 5922 | + this.lockButton = document.createElement('div'); | |
| 5923 | + this.lockButton.className = 'geBtn gePrimaryBtn'; | |
| 5924 | + this.lockButton.style.display = 'inline-block'; | |
| 5925 | + this.lockButton.style.backgroundColor = '#F2931E'; | |
| 5926 | + this.lockButton.style.borderColor = '#F08705'; | |
| 5927 | + this.lockButton.style.backgroundImage = 'none'; | |
| 5928 | + this.lockButton.style.marginTop = '-10px'; | |
| 5929 | + this.lockButton.style.lineHeight = '28px'; | |
| 5930 | + this.lockButton.style.minWidth = '0px'; | |
| 5931 | + this.lockButton.style.cssFloat = 'right'; | |
| 5932 | + this.lockButton.setAttribute('title', '锁定 / 解锁'); | |
| 5933 | + mxUtils.write(this.lockButton, '锁定 / 解锁'); | |
| 5934 | + mxEvent.addListener(this.lockButton, 'click', mxUtils.bind(this, function() | |
| 5935 | + { | |
| 5936 | + if (this.actions.actions.lockUnlock.enabled){ | |
| 5937 | + this.actions.actions.lockUnlock.funct() | |
| 5938 | + } | |
| 5939 | + })); | |
| 5940 | + this.buttonContainer.appendChild(this.lockButton); | |
| 5941 | + | |
| 5921 | 5942 | // TODO thingsKit 预览模式按钮 |
| 5922 | 5943 | this.shareButton = document.createElement('div'); |
| 5923 | 5944 | this.shareButton.className = 'geBtn gePrimaryBtn'; |
| ... | ... | @@ -6005,6 +6026,8 @@ App.prototype.updateButtonContainer = function() |
| 6005 | 6026 | this.shareButton = null; |
| 6006 | 6027 | this.saveButton.parentNode.removeChild(this.saveButton); |
| 6007 | 6028 | this.saveButton = null; |
| 6029 | + this.lockButton.parentNode.removeChild(this.lockButton); | |
| 6030 | + this.lockButton = null; | |
| 6008 | 6031 | } |
| 6009 | 6032 | |
| 6010 | 6033 | //Fetch notifications | ... | ... |