]> git.openstreetmap.org Git - potlatch2.git/commitdiff
Merge branch 'master' of github.com:systemed/potlatch2
authorRichard Fairhurst <richard@systemeD.net>
Tue, 20 Aug 2013 12:08:20 +0000 (13:08 +0100)
committerRichard Fairhurst <richard@systemeD.net>
Tue, 20 Aug 2013 12:08:20 +0000 (13:08 +0100)
1  2 
net/systemeD/potlatch2/help/HelpDialog.mxml

index ad32742f66ed2d64af143c44f2e1f4dca8027f9a,cbd31c620417aa177b64b34f3b2ba93bf60bed51..0db6fc65d8b3f80f207558452bc046765218ef2c
      }
  
      private function getIntroText():String {
 -        var site_name:String = loaderInfo.parameters["site_name"];
 +        var site_name:String = loaderInfo.parameters["site_name"] || "OpenStreetMap";
                var browser:String = String(ExternalInterface.call("function() {return navigator.userAgent;}")).toLowerCase();
  
                var intro:String = '';
                if (site_name=='OpenStreetMap' && browser.indexOf('msie')==-1) {
                        intro+="<p><font size='+4' color='#FF0000'><b>New user?</b> There's now an easier first-time editor you can try instead of this. Click the triangle by the Edit menu and select 'iD'.</font></p>";
                }
 -              intro+="<p><b>Potlatch 2</b> is an intermediate-level OpenStreetMap (OSM) editor that allows you to make edits directly through ";
 -        if (site_name) { intro+="the " + site_name + " website.</p>"; }
 -              else { intro+="this website.</p>"; }
 +              intro+="<p><b>Potlatch 2</b> is an intermediate-level OpenStreetMap (OSM) editor that allows you to make edits directly through the " + site_name + " website.</p>";
                return intro;
      }
  
          return "<p>If you feel confident with your edits, hit save to publish to <a href=\"http://www.openstreetmap.org\" target=\"_blank\">http://www.openstreetmap.org</a>. Most edits take a few hours to show up on OSM.</p>"
      }
  
+     private function getIntroImage():String {
+         var intro_image:String = loaderInfo.parameters["intro_image"];
+         return intro_image ? intro_image : "help/introduction.jpg";
+     }
+     private function getIntroVideo():String {
+         var intro_video:String = loaderInfo.parameters["intro_video"];
+         return intro_video ? intro_video : "help/introduction.mp4";
+     }
      private function buildGrid(text:Array):Grid {
          var grid:Grid = new Grid()
          grid.percentWidth=100;
  
      <mx:VBox id="introduction" label="Introduction" width="100%" height="100%" hide="introvideo.stopPlaying()" removedFromStage="introvideo.stopPlaying()">
                <help:VideoPlayer width="640" height="369" id="introvideo"
-                       file="help/introduction.mp4" 
-                       previewImage="help/introduction.jpg" />
+                       file="{getIntroVideo()}"
+                       previewImage="{getIntroImage()}" />
        </mx:VBox>
  
      <mx:VBox id="Controls" label="Controls" width="100%" height="100%">