rsence-pre 3.0.0.5 → 3.0.0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/VERSION +1 -1
  3. data/client/conf/client_pkg.yaml +8 -8
  4. data/client/js/chat/speech_bubble/themes/default/speech_bubble.css +3 -3
  5. data/client/js/controls/button/button.coffee +45 -0
  6. data/client/js/controls/button/themes/default/button.css +39 -72
  7. data/client/js/controls/button/themes/default/button.html +14 -4
  8. data/client/js/controls/checkbox/checkbox.js +9 -8
  9. data/client/js/controls/checkbox/themes/default/checkbox.css +1 -1
  10. data/client/js/controls/checkbox/themes/default/checkbox.html +1 -0
  11. data/client/js/controls/clickbutton/clickbutton.coffee +44 -0
  12. data/client/js/controls/onoffbutton/themes/default/onoffbutton.css +20 -19
  13. data/client/js/controls/onoffbutton/themes/default/onoffbutton.html +1 -4
  14. data/client/js/controls/radiobutton/themes/default/radiobutton.css +1 -1
  15. data/client/js/controls/radiobutton/themes/default/radiobutton.html +1 -0
  16. data/client/js/controls/searchfield/searchfield.coffee +1 -1
  17. data/client/js/controls/searchfield/themes/default/searchfield.css +1 -1
  18. data/client/js/controls/stringview/themes/default/stringview.css +1 -1
  19. data/client/js/controls/tab/tab.js +17 -17
  20. data/client/js/controls/tab/themes/default/tab.css +16 -16
  21. data/client/js/controls/tab/themes/default/tab.html +1 -1
  22. data/client/js/controls/textarea/textarea.js +1 -1
  23. data/client/js/controls/textarea/themes/default/textarea.css +1 -1
  24. data/client/js/controls/textcontrol/themes/default/textcontrol.css +1 -2
  25. data/client/js/controls/uploader/themes/default/uploader.css +10 -62
  26. data/client/js/controls/uploader/themes/default/uploader.html +31 -25
  27. data/client/js/controls/uploader/uploader.coffee +10 -7
  28. data/client/js/controls/window/themes/default/window.css +2 -4
  29. data/client/js/core/elem/elem.coffee +4 -4
  30. data/client/js/core/event/event.js +11 -11
  31. data/client/js/datetime/calendar/themes/default/calendar.css +3 -3
  32. data/client/js/foundation/eventmanager/eventmanager.coffee +44 -1
  33. data/client/js/foundation/thememanager/thememanager.coffee +30 -17
  34. data/client/js/foundation/view/view.js +194 -192
  35. data/client/js/menus/menuitem/themes/default/menuitem.css +1 -1
  36. data/client/js/menus/minimenu/themes/default/minimenu.css +1 -1
  37. data/client/js/menus/minimenuitem/themes/default/minimenuitem.css +1 -1
  38. data/client/js/menus/popupmenu/themes/default/popupmenu.css +1 -1
  39. data/plugins/client_pkg/lib/client_pkg_build.rb +54 -53
  40. data/plugins/main/tmpl/index.html +1 -1
  41. metadata +4 -5
  42. data/client/js/controls/button/button.js +0 -78
  43. data/client/js/controls/button/themes/default/button_parts1.png +0 -0
  44. data/client/js/foundation/view/markupview/markupview.js +0 -95
@@ -1,16 +1,16 @@
1
1
  HThemeManager = HClass.extend
2
-
2
+
3
3
  allInOneCSS: true # temporary solution until new theme is crafted
4
4
 
5
5
  currentTheme: 'default'
6
6
 
7
7
  constructor: null
8
-
8
+
9
9
  # Properties by theme name
10
10
  currentThemePath: null
11
11
  themePaths: {}
12
12
  themes: []
13
-
13
+
14
14
  # Set the graphics loading path of the the themeName
15
15
  setThemePath: (_clientPrefix)->
16
16
  @currentThemePath = _clientPrefix
@@ -31,20 +31,20 @@ HThemeManager = HClass.extend
31
31
  _clientThemePath = [ @currentThemePath, _themeName ].join('/') + '/gfx/'
32
32
  @themePaths[_themeName] = _clientThemePath
33
33
  @setupAllInOneCSS(_themeName) if @allInOneCSS
34
-
34
+
35
35
  # CSS Templates and CSS Template methods per theme name
36
36
  themeCSSTemplates: {}
37
37
 
38
38
  # Sets the css template data per theme, all at once
39
39
  setThemeCSSTemplates: (_themeName, _themeCSS)->
40
- @themeCSSTemplates[_themeName] = _themeCSS
40
+ @themeCSSTemplates[_themeName] = _themeCSS
41
41
 
42
42
  # HTML Templates and HTML Template methods per theme name
43
43
  themeHTMLTemplates: {}
44
44
 
45
45
  # Sets the css template data per theme, all at once
46
46
  setThemeHTMLTemplates: (_themeName, _themeHTML)->
47
- @themeHTMLTemplates[_themeName] = _themeHTML
47
+ @themeHTMLTemplates[_themeName] = _themeHTML
48
48
 
49
49
  # Set the theme data, this is called by the serverside client_pkg suite
50
50
  installThemeData: (_themeName, _themeCSS, _themeHTML)->
@@ -90,8 +90,6 @@ HThemeManager = HClass.extend
90
90
  return ''
91
91
  return '' unless @themeHTMLTemplates[_themeName][_componentName]?
92
92
  [_tmplJS, _tmplHTML] = @themeHTMLTemplates[_themeName][_componentName]
93
- # console.log( 'tmplJS:', _tmplJS )
94
- # console.log( 'tmplHTML:', _tmplHTML )
95
93
  _rect = _view.rect
96
94
  _callArgs = [_view.elemId.toString(), _rect.width, _rect.height]
97
95
  _tmplHTML = _tmplHTML.replace(/\]I\[/g,_callArgs[0]).replace(/\]W\[/g,_callArgs[1]).replace(/\]H\[/g,_callArgs[2])
@@ -116,6 +114,16 @@ HThemeManager = HClass.extend
116
114
  # console.log('tmplHTML:',_tmplHTML) if _componentName == 'tab'
117
115
  return _tmplHTML
118
116
 
117
+ gradientCSS: ->
118
+ _colors = []
119
+ _colors.push( _color ) for _color in arguments
120
+ _gradient = ELEM._linearGradientCSS(
121
+ start: _colors.shift()
122
+ end: _colors.pop()
123
+ steps: _colors
124
+ )
125
+ # console.log(_gradient)
126
+ return _gradient
119
127
  buildCSSTemplate: ( _context, _themeName, _componentName )->
120
128
  unless @themeCSSTemplates[_themeName]?
121
129
  console.log('Theme not installed:',_themeName)
@@ -124,8 +132,6 @@ HThemeManager = HClass.extend
124
132
  [_tmplJS, _tmplCSS] = @themeCSSTemplates[_themeName][_componentName]
125
133
  return _tmplCSS if _tmplJS.length == 0
126
134
  [_variableMatch, _assignmentMatch] = [@_variableMatch, @_assignmentMatch]
127
- # console.log( 'tmplJS:', _tmplJS )
128
- # console.log( 'tmplCSS:', _tmplCSS )
129
135
  @getThemeGfxFile = (_fileName)-> @_buildThemePath(_fileName,_themeName)
130
136
  @getCssFilePath = (_fileName)->
131
137
  "url(#{@_buildThemePath(_fileName,_themeName)})"
@@ -145,7 +151,6 @@ HThemeManager = HClass.extend
145
151
  _tmplCSS = _tmplCSS.replace( _variableMatch, _callValue( RegExp.$1 ) )
146
152
  delete @getCssFilePath
147
153
  delete @getThemeGfxFile
148
- # console.log('tmplCSS:',_tmplCSS)
149
154
  return _tmplCSS
150
155
 
151
156
  resourcesFor: (_view, _themeName, _noHTML)->
@@ -166,7 +171,7 @@ HThemeManager = HClass.extend
166
171
  for _ancestor in _view.ancestors
167
172
  break unless _ancestor.componentName?
168
173
  @resourcesFor( _ancestor, _themeName, true )
169
- return @buildHTMLTemplate( _view, _themeName, _componentName )
174
+ @buildHTMLTemplate( _view, _themeName, _componentName )
170
175
 
171
176
  freeResourcesFor: (_view, _themeName, _noRecursion)->
172
177
  _themeName = @currentTheme unless _themeName?
@@ -178,26 +183,34 @@ HThemeManager = HClass.extend
178
183
  break unless _ancestor.componentName?
179
184
  @freeResourcesFor( _ancestor, _themeName )
180
185
 
186
+ _ieActiveCssRe: /\.([_a-zA-Z0-9]+?)\:active/gm
187
+ _ieActiveCssClassMatch: []
188
+ _ieActivePatch: (_cssText)->
189
+ _ieActiveCssClassMatch = @_ieActiveCssClassMatch
190
+ _cssText.replace( @_ieActiveCssRe, (_all,_class)->
191
+ _ieActiveCssClassMatch.push(_class)
192
+ ".#{_class}.ieActive"
193
+ )
194
+
181
195
  # Creates a new cascading style sheet element and set its content with css. Returns the element.
182
196
  useCSS: (_cssText)->
183
197
  if BROWSER_TYPE.ie
184
- # Internet Explorer (at least 6.x; check what 7.x does)
185
198
  _style = document.createStyleSheet()
186
- _style.cssText = _cssText
199
+ _style.cssText = @_ieActivePatch(_cssText)
187
200
  else
188
201
  # Common, standard <style> tag generation in <head>
189
202
  _style = document.createElement('style')
190
203
  _style.type = 'text/css'
191
204
  _style.media = 'all'
192
-
205
+
193
206
  _head = document.getElementsByTagName('head')[0]
194
- _head.appendChild(_style)
195
-
207
+
196
208
  if BROWSER_TYPE.safari
197
209
  # This is how to do it in KHTML browsers
198
210
  _style.appendChild( document.createTextNode(_cssText) )
199
211
  else
200
212
  # This works for others (add more checks, if problems with new browsers)
201
213
  _style.textContent = _cssText
214
+ _head.appendChild(_style)
202
215
 
203
216
  _style