]> dev.renevier.net Git - syj.git/commitdiff
button to start a route
authorarno <arno@renevier.net>
Mon, 9 Aug 2010 19:34:53 +0000 (21:34 +0200)
committerarno <arno@renevier.net>
Fri, 13 Aug 2010 11:55:04 +0000 (13:55 +0200)
application/views/scripts/idx/index.phtml
public/js/syj.js

index 7d0fe87fddc5c1064194ce970b664b819432c947..001734bdf49dd5f2acfea8a4bd18b315815b442e 100644 (file)
@@ -21,7 +21,9 @@
     </div>
 
     <div id="data_controls">
-    <input id="edit-btn" name="edit-btn" type="button" value="<?php echo $this->translate('edit')?>">
+    <input id="edit-btn" name="edit-btn" type="button" value="<?php
+        echo isset($this->path) ? $this->translate('edit'): $this->translate('start');
+    ?>">
 
     <?php
         print $this->geomform;
index b5121d4752a5a56fda3605ae5f1fa26674cb374b..e32bc06bc5d45942308a0364fee384f09e09a7de 100644 (file)
@@ -80,10 +80,6 @@ var SyjSaveUI = {
 };
 
 var SyjEditUI = {
-    init: function() {
-        return this;
-    },
-
     hide: function() {
         $("edit-btn").blur();
         $("edit-btn").hide();
@@ -263,7 +259,6 @@ var SYJView = {
             this.messenger.hide();
             this.editMode();
         }).bind(this));
-        SyjEditUI.init().hide();
 
         $("geomform").ajaxize({
                 presubmit: this.prepareForm.bind(this),
@@ -290,11 +285,9 @@ var SYJView = {
             // XXX: ie has not guessed height of map main div yet during map
             // initialisation. Now, it will read it correctly.
             this.map.updateSize();
-            SyjEditUI.show();
         } else {
             extent = new OpenLayers.Bounds(gMaxExtent.minlon, gMaxExtent.minlat, gMaxExtent.maxlon, gMaxExtent.maxlat)
                                          .transform(WGS84, Mercator);
-            this.editMode();
         }
         this.map.zoomToExtent(extent);
         document.observe('simplebox:shown', this.observer.bindAsEventListener(this));