author | Michael Krelin <hacker@klever.net> | 2014-06-30 18:20:13 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2014-06-30 18:20:13 (UTC) |
commit | c392fe28606eefa0c814e5c25d641f5ffe623186 (patch) (unidiff) | |
tree | da03fe13ca09fadbebbad9b5d38750757270bae8 /frontend/beta/js/Clipperz/PM/Components/RecordDetail | |
parent | d341307d346dee62ee36b27f0f93b8f000748a96 (diff) | |
parent | 6dd16d9359e3a4dc306802588b09acd43947a606 (diff) | |
download | clipperz-c392fe28606eefa0c814e5c25d641f5ffe623186.zip clipperz-c392fe28606eefa0c814e5c25d641f5ffe623186.tar.gz clipperz-c392fe28606eefa0c814e5c25d641f5ffe623186.tar.bz2 |
Merge remote-tracking branch 'github/master' into nmaster
Diffstat (limited to 'frontend/beta/js/Clipperz/PM/Components/RecordDetail') (more/less context) (ignore whitespace changes)
-rw-r--r-- | frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginBindingComponent.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginBindingComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginBindingComponent.js index 0e4640e..a5a4697 100644 --- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginBindingComponent.js +++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginBindingComponent.js | |||
@@ -55,115 +55,115 @@ YAHOO.extendX(Clipperz.PM.Components.RecordDetail.DirectLoginBindingComponent, C | |||
55 | 55 | ||
56 | //------------------------------------------------------------------------- | 56 | //------------------------------------------------------------------------- |
57 | 57 | ||
58 | 'directLoginBinding': function() { | 58 | 'directLoginBinding': function() { |
59 | return this._directLoginBinding; | 59 | return this._directLoginBinding; |
60 | }, | 60 | }, |
61 | 61 | ||
62 | //------------------------------------------------------------------------- | 62 | //------------------------------------------------------------------------- |
63 | 63 | ||
64 | 'render': function() { | 64 | 'render': function() { |
65 | // Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'span', style:'font-weight:bold;', html:this.directLoginBinding().key()}) | 65 | // Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'span', style:'font-weight:bold;', html:this.directLoginBinding().key()}) |
66 | // Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'span', html:this.directLoginBinding().value()}) | 66 | // Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'span', html:this.directLoginBinding().value()}) |
67 | //MochiKit.Logging.logDebug(">>> DirectLoginBindingComponent.render"); | 67 | //MochiKit.Logging.logDebug(">>> DirectLoginBindingComponent.render"); |
68 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td', cls:'directLoginBindingLabelTD', children:[ | 68 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td', cls:'directLoginBindingLabelTD', children:[ |
69 | {tag:'span', html:this.directLoginBinding().key()} | 69 | {tag:'span', html:this.directLoginBinding().key()} |
70 | ]}); | 70 | ]}); |
71 | //MochiKit.Logging.logDebug("--- DirectLoginBindingComponent.render - 1"); | 71 | //MochiKit.Logging.logDebug("--- DirectLoginBindingComponent.render - 1"); |
72 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td', cls:'directLoginBindingValueTD', children:[ | 72 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td', cls:'directLoginBindingValueTD', children:[ |
73 | {tag:'div', id:this.getId('editModeBox'), children:[ | 73 | {tag:'div', id:this.getId('editModeBox'), children:[ |
74 | {tag:'select', id:this.getId('select'), children:this.recordFieldOptions()} | 74 | {tag:'select', id:this.getId('select'), children:this.recordFieldOptions()} |
75 | ]}, | 75 | ]}, |
76 | {tag:'div', id:this.getId('viewModeBox'), children:[ | 76 | {tag:'div', id:this.getId('viewModeBox'), children:[ |
77 | {tag:'span', id:this.getId('viewValue'), html:""} | 77 | {tag:'span', id:this.getId('viewValue'), html:""} |
78 | ]} | 78 | ]} |
79 | ]}); | 79 | ]}); |
80 | //MochiKit.Logging.logDebug("--- DirectLoginBindingComponent.render - 2"); | 80 | //MochiKit.Logging.logDebug("--- DirectLoginBindingComponent.render - 2"); |
81 | this.getElement('editModeBox').setVisibilityMode(YAHOO.ext.Element.DISPLAY); | 81 | this.getElement('editModeBox').setVisibilityMode(YAHOO.ext.Element.DISPLAY); |
82 | this.getElement('viewModeBox').setVisibilityMode(YAHOO.ext.Element.DISPLAY); | 82 | this.getElement('viewModeBox').setVisibilityMode(YAHOO.ext.Element.DISPLAY); |
83 | 83 | ||
84 | this.update(); | 84 | this.update(); |
85 | //MochiKit.Logging.logDebug("<<< DirectLoginBindingComponent.render"); | 85 | //MochiKit.Logging.logDebug("<<< DirectLoginBindingComponent.render"); |
86 | }, | 86 | }, |
87 | 87 | ||
88 | //------------------------------------------------------------------------- | 88 | //------------------------------------------------------------------------- |
89 | 89 | ||
90 | 'recordFieldOptions': function() { | 90 | 'recordFieldOptions': function() { |
91 | varresult; | 91 | varresult; |
92 | var option; | 92 | var option; |
93 | varrecordFieldKey; | 93 | varrecordFieldKey; |
94 | varrecordFields; | 94 | varrecordFields; |
95 | 95 | ||
96 | //MochiKit.Logging.logDebug(">>> DirectLoginBindingComponent.recordFieldOptions"); | 96 | //MochiKit.Logging.logDebug(">>> DirectLoginBindingComponent.recordFieldOptions"); |
97 | recordFields = this.directLoginBinding().directLogin().record().currentVersion().fields(); | 97 | recordFields = this.directLoginBinding().directLogin().record().currentVersion().fields(); |
98 | result = []; | 98 | result = []; |
99 | option = {tag:'option', value:null, html:'---'}; | 99 | option = {tag:'option', value:null, html:'---'}; |
100 | result.push(option); | 100 | result.push(option); |
101 | for (recordFieldKey in recordFields) { | 101 | for (recordFieldKey in recordFields) { |
102 | //TODO: remove the value: field and replace it with element.dom.value = <some value> | 102 | //TODO: remove the value: field and replace it with element.dom.value = <some value> |
103 | option = {tag:'option', value:recordFieldKey, html:recordFields[recordFieldKey].label()} | 103 | option = {tag:'option', value:recordFieldKey, html:Clipperz.Base.sanitizeString(recordFields[recordFieldKey].label())} |
104 | if (recordFieldKey == this.directLoginBinding().fieldKey()) { | 104 | if (recordFieldKey == this.directLoginBinding().fieldKey()) { |
105 | option['selected'] = true; | 105 | option['selected'] = true; |
106 | } | 106 | } |
107 | result.push(option); | 107 | result.push(option); |
108 | } | 108 | } |
109 | //MochiKit.Logging.logDebug("<<< DirectLoginBindingComponent.recordFieldOptions"); | 109 | //MochiKit.Logging.logDebug("<<< DirectLoginBindingComponent.recordFieldOptions"); |
110 | 110 | ||
111 | return result; | 111 | return result; |
112 | }, | 112 | }, |
113 | 113 | ||
114 | //------------------------------------------------------------------------- | 114 | //------------------------------------------------------------------------- |
115 | 115 | ||
116 | 'syncAndUpdateEditMode': function() { | 116 | 'syncAndUpdateEditMode': function() { |
117 | this.synchronizeComponentValues(); | 117 | this.synchronizeComponentValues(); |
118 | this.updateEditMode(); | 118 | this.updateEditMode(); |
119 | }, | 119 | }, |
120 | 120 | ||
121 | 'updateEditMode': function() { | 121 | 'updateEditMode': function() { |
122 | varselectElementBox; | 122 | varselectElementBox; |
123 | 123 | ||
124 | //MochiKit.Logging.logDebug(">>> DirectLoginBindingComponent.updateEditMode"); | 124 | //MochiKit.Logging.logDebug(">>> DirectLoginBindingComponent.updateEditMode"); |
125 | this.getElement('viewModeBox').hide(); | 125 | this.getElement('viewModeBox').hide(); |
126 | 126 | ||
127 | selectElementBox = this.getElement('editModeBox'); | 127 | selectElementBox = this.getElement('editModeBox'); |
128 | selectElementBox.update(""); | 128 | selectElementBox.update(""); |
129 | 129 | ||
130 | Clipperz.YUI.DomHelper.append(selectElementBox.dom, {tag:'select', id:this.getId('select'), children:this.recordFieldOptions()}); | 130 | Clipperz.YUI.DomHelper.append(selectElementBox.dom, {tag:'select', id:this.getId('select'), children:this.recordFieldOptions()}); |
131 | 131 | ||
132 | /* | 132 | /* |
133 | selectElement = this.getElement('select'); | 133 | selectElement = this.getElement('select'); |
134 | 134 | ||
135 | selectElement.update(""); | 135 | selectElement.update(""); |
136 | MochiKit.Iter.forEach(this.recordFieldOptions(), function(anOption) { | 136 | MochiKit.Iter.forEach(this.recordFieldOptions(), function(anOption) { |
137 | Clipperz.YUI.DomHelper.append(selectElement.dom, anOption); | 137 | Clipperz.YUI.DomHelper.append(selectElement.dom, anOption); |
138 | }); | 138 | }); |
139 | */ | 139 | */ |
140 | 140 | ||
141 | 141 | ||
142 | this.getElement('editModeBox').show(); | 142 | this.getElement('editModeBox').show(); |
143 | //MochiKit.Logging.logDebug("<<< DirectLoginBindingComponent.updateEditMode"); | 143 | //MochiKit.Logging.logDebug("<<< DirectLoginBindingComponent.updateEditMode"); |
144 | }, | 144 | }, |
145 | 145 | ||
146 | //------------------------------------------------------------------------- | 146 | //------------------------------------------------------------------------- |
147 | 147 | ||
148 | 'updateViewMode': function() { | 148 | 'updateViewMode': function() { |
149 | //MochiKit.Logging.logDebug(">>> DirectLoginBindingComponent.updateViewMode"); | 149 | //MochiKit.Logging.logDebug(">>> DirectLoginBindingComponent.updateViewMode"); |
150 | this.getElement('editModeBox').hide(); | 150 | this.getElement('editModeBox').hide(); |
151 | this.getElement('viewModeBox').show(); | 151 | this.getElement('viewModeBox').show(); |
152 | 152 | ||
153 | this.getElement('viewValue').update(this.directLoginBinding().field().label()); | 153 | this.getElement('viewValue').update(Clipperz.Base.sanitizeString(this.directLoginBinding().field().label())); |
154 | //MochiKit.Logging.logDebug("<<< DirectLoginBindingComponent.updateViewMode"); | 154 | //MochiKit.Logging.logDebug("<<< DirectLoginBindingComponent.updateViewMode"); |
155 | }, | 155 | }, |
156 | 156 | ||
157 | //------------------------------------------------------------------------- | 157 | //------------------------------------------------------------------------- |
158 | 158 | ||
159 | 'synchronizeComponentValues': function() { | 159 | 'synchronizeComponentValues': function() { |
160 | //MochiKit.Logging.logDebug(">>> DirectLoginBindingComponent.synchronizeComponentValues") | 160 | //MochiKit.Logging.logDebug(">>> DirectLoginBindingComponent.synchronizeComponentValues") |
161 | //MochiKit.Logging.logDebug("--- DirectLoginBindingComponent.synchronizeComponentValues - 1 - " + this.getId('select')); | 161 | //MochiKit.Logging.logDebug("--- DirectLoginBindingComponent.synchronizeComponentValues - 1 - " + this.getId('select')); |
162 | this.directLoginBinding().setFieldKey(this.getDom('select').value); | 162 | this.directLoginBinding().setFieldKey(this.getDom('select').value); |
163 | //MochiKit.Logging.logDebug("<<< DirectLoginBindingComponent.synchronizeComponentValues"); | 163 | //MochiKit.Logging.logDebug("<<< DirectLoginBindingComponent.synchronizeComponentValues"); |
164 | }, | 164 | }, |
165 | 165 | ||
166 | //------------------------------------------------------------------------- | 166 | //------------------------------------------------------------------------- |
167 | __syntaxFix__: "syntax fix" | 167 | __syntaxFix__: "syntax fix" |
168 | }); | 168 | }); |
169 | 169 | ||