Commit 2fb9f80de342d719fd9d8d6ca724de288a1159cb

  • avatar
  • arvind
  • Tue Apr 08 20:22:26 IST 2014
Changing load behaviour of the image.  User should hit annotate to start
annotating the image. This is a hack, this should be fixed.
Changing the layout of the interface of the app.  Sign In comes on the
top right of the screen, and helpview has become shorter.
  
175175 var AppView = Backbone.View.extend({
176176 el: $('#swt-maker'),
177177 events: {
178 'click #img-url-load': 'setImage',
178179 'click #img-url-submit': 'setImage',
179180 'click #sweet': 'sweet',
180181 'click #signin-credentials': 'getSignInCredentials',
191191 anno.hideAnnotations();});
192192 anno.addHandler('onSelectionCompleted', function(annotation) {
193193 anno.showAnnotations(); });
194
195
194
195
196196 this.$overlay = $('#app-overlay');
197197 this.$img = $('#annotatable-img');
198198 this.imgURL = this.$img.attr('src');
244244 },
245245 error: function(jqxhr, error, statusText) {
246246 if(jqxhr.status === 404) { //annotations don't exist for this image
247 //console.log('annotations don\'t exist for this image. Create one!');
247 console.log('annotations don\'t exist for this image. Create one!');
248248 }
249249 swtr.appView.$overlay.hide();
250250 swtr.appView.helpview.step(2);
285285 $("p").toggle();
286286 $('.annotorious-item-unfocus').css("opacity", "0");
287287 }
288
288
289289 },
290290 getSignInCredentials: function(event) {
291291 event.preventDefault();
  
1515 <body>
1616
1717 <div id="swt-maker" class="container">
18 <div id="helpview" class="alert alert-info"></div>
18 <div id="helpview" class="alert alert-info col-md-8"></div>
1919 <div class="row" id="signinview">
2020 <form class="form-inline" role="form">
2121 <span id="signin-msg">You are not signed in. </span>
2424 </button>
2525 </form>
2626 </div>
27 <div id="img-input">
28 <div class="form-group">
27 <div id="img-input" class="row">
28 <div class="form-group col-md-8">
2929 <input type="text" placeholder="Enter URL of the image"
30 id="img-url-input" class="form-control">
30 id="img-url-input" class="form-control">
3131 </div>
32 <button class="btn btn-default" id="img-url-submit">GO</button>
32 <div class="col-md-2">
33 <button class="btn btn-default" id="img-url-submit">GO</button>
34 </div>
35 <div class="col-md-8">
36 <button class="btn btn-default" id="img-url-load">Annotate</button>
3337 <button class="btn btn-default" id="sweet">Sweet</button>
3438 <input id="setbox" type="checkbox"/ > <label
35 id="setcontrol"><p>Show Box</p><p style="display: none">Hide
36 Box</p></label>
39 id="setcontrol"><p>Show annotated areas</p><p style="display: none">Hide
40 annotated areas</p></label>
41 </div>
3742 </div>
3843 <div id="img-annotation-wrapper" class="col-md-12 col-xs-12 col-lg-12 col-sm-12 well">
3944 {% if url %}
8282 </li>
8383 </script>
8484 <script type="text/template" id="signin-credentials-template">
85 <div class="form-group">
85 <div class="form-inline col-md-3">
8686 <label class="sr-only" for="username">Username</label>
8787 <input type="text" class="form-control" id="username" placeholder="Enter username">
8888 </div>
89 <div class="form-group">
89 <div class="form-inline col-md-3">
9090 <label class="sr-only" for="password">Password</label>
9191 <input type="password" class="form-control" id="password" placeholder="Password">
9292 </div>