material_raingular-ace 0.0.4.1 → 0.0.4.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 968c6e0457ed148309339d5a588f4802cce23268
4
- data.tar.gz: 9c53964a6551e8635492757227d5e18c67066969
3
+ metadata.gz: 98b4aa811833c4e83d7511e384983134b8a8aff0
4
+ data.tar.gz: 24dec3af5da3855af93eaee3934c9b3e53abc4a1
5
5
  SHA512:
6
- metadata.gz: af0b50ea8c78ce6edaab95ef4a949e08a9ce527e525be0244f2d05f77ff28f3cf147bc9ebb4db78773f8e99e6b4044f4605b925394339ed0f999d8675a6a9774
7
- data.tar.gz: 19177bac8d6e0a59873c3abaf91b189369c6c35831756347a6ad013ebf768d0565ecaa4c852a3bf30a214fe63067de2da1cc5113831d2aa8f83ed657d888a838
6
+ metadata.gz: b0f74ca5c88fdd5df62efb2684623672da81bd1db8282368b75a74b40975e48d41e2a8015fc26770f44979d249e9d9106a329801d7b92412a7f7cdd35b9c648f
7
+ data.tar.gz: cdaf46d6b945ecd4213f670a3945be385d274ad8408111e57083b75b034bc8e5a1935981bc715db7cae4f3f42929a9f74e3e5c921b473701e1bfa302da8f8f2c
@@ -36,10 +36,14 @@ angular.module('materialRaingularAce', [])
36
36
  template: (element,attributes) ->
37
37
  websocketHelper = ->
38
38
  if typeof attributes.webSocket == 'undefined' then 'update' else 'model'
39
- id = attributes['editorId'] || attributes.ngModel.replace('.','-') + "-code-editor"
40
- '<span><div id="' + id + '"></div><input type="hidden" ng-' + websocketHelper + '="' + attributes.ngModel + '"</span>'
39
+ '<span><div></div><input type="hidden" ng-' + websocketHelper + '="' + attributes.ngModel + '"</span>'
41
40
  link: (scope, element, attributes, modelCtrl)->
42
- id = attributes['editorId'] || attributes.ngModel.replace('.','-') + "-code-editor"
41
+ exitStatus = true
42
+ while exitStatus
43
+ uniqueId = Math.floor(Math.random()*(1000000))
44
+ exitStatus = !!document.getElementById(uniqueId)
45
+ id = attributes.ngModel.replace('.','-') + "-code-editor-" + uniqueId
46
+ element[0].getElementsByTagName('div')[0].setAttribute('id',id)
43
47
  angular.ace = {} unless angular.ace
44
48
  editor = ace.edit(id)
45
49
  mode = attributes.codeType || 'ruby'
@@ -1,5 +1,5 @@
1
1
  module MaterialRaingular
2
2
  module Ace
3
- VERSION = "0.0.4.1"
3
+ VERSION = "0.0.4.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: material_raingular-ace
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4.1
4
+ version: 0.0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Moody
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-09-27 00:00:00.000000000 Z
11
+ date: 2015-09-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler