Commit b5e65154dd9e2455a36d3a561ecbbeb483a1add9
- Diff rendering mode:
- inline
- side by side
swtr/static/js/swtmaker.js
(14 / 3)
  | |||
177 | 177 | events: { | |
178 | 178 | 'click #img-url-submit': 'setImage', | |
179 | 179 | 'click #sweet': 'sweet', | |
180 | 'click #signin-credentials': 'getSignInCredentials' | ||
180 | 'click #signin-credentials': 'getSignInCredentials', | ||
181 | 'click #setbox': 'showHide' | ||
181 | 182 | }, | |
182 | 183 | initialize: function() { | |
183 | 184 | //var allElements = $('body *'); | |
… | … | ||
190 | 190 | anno.hideAnnotations();}); | |
191 | 191 | anno.addHandler('onSelectionCompleted', function(annotation) { | |
192 | 192 | anno.showAnnotations(); }); | |
193 | anno.addHandler('onEditorShown', function(annotation) { | ||
194 | anno.hideAnnotations();} ); | ||
193 | |||
194 | |||
195 | 195 | this.$overlay = $('#app-overlay'); | |
196 | 196 | this.$img = $('#annotatable-img'); | |
197 | 197 | this.imgURL = this.$img.attr('src'); | |
… | … | ||
203 | 203 | this.helpview.step(1); | |
204 | 204 | } | |
205 | 205 | }, | |
206 | showHide: function() { | ||
207 | if($("input:checked").length) { | ||
208 | $('.annotorious-item-unfocus').css("opacity", "0.5"); | ||
209 | } | ||
210 | else { | ||
211 | $('.annotorious-item-unfocus').css("opacity", "0"); | ||
212 | } | ||
213 | |||
214 | }, | ||
215 | |||
206 | 216 | setImage: function() { | |
207 | 217 | anno.reset(); | |
208 | 218 | this.imgURL = $('#img-url-input').val(); |
swtr/templates/index.html
(1 / 0)
  | |||
31 | 31 | </div> | |
32 | 32 | <button class="btn btn-default" id="img-url-submit">GO</button> | |
33 | 33 | <button class="btn btn-default" id="sweet">Sweet</button> | |
34 | <input id="setbox" type="checkbox" >Show/Hide Box</input> | ||
34 | 35 | </div> | |
35 | 36 | <div id="img-annotation-wrapper" class="col-md-12 col-xs-12 col-lg-12 col-sm-12 well"> | |
36 | 37 | {% if url %} |