start.html 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503
  1. <!DOCTYPE html>
  2. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  3. <head>
  4. <title>Untitled Document</title>
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
  6. <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  7. <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  8. <meta name="apple-mobile-web-app-capable" content="yes" />
  9. <link type="text/css" href="resources/css/reset.css" rel="Stylesheet" />
  10. <link type="text/css" href="resources/css/default.css" rel="Stylesheet" />
  11. <!--<link href='https://fonts.googleapis.com/css?family=Nunito:300' rel='stylesheet' type='text/css'>-->
  12. <script type="text/javascript">
  13. if (location.href.toString().indexOf('file://localhost/') == 0) {
  14. location.href = location.href.toString().replace('file://localhost/', 'file:///');
  15. }
  16. </script>
  17. <script type="text/javascript" src="resources/scripts/jquery-1.7.1.min.js"></script>
  18. <script type="text/javascript" src="resources/scripts/player/splitter.js"></script>
  19. <script type="text/javascript" src="resources/scripts/axutils.js"></script>
  20. <script type="text/javascript" src="resources/scripts/player/axplayer.js"></script>
  21. <script type="text/javascript" src="resources/scripts/messagecenter.js"></script>
  22. <script type="text/javascript" src="data/document.js"></script>
  23. <style type="text/css">
  24. #outerContainer {
  25. width:1000px;
  26. height:1500px;
  27. }
  28. .vsplitbar {
  29. width: 3px;
  30. /*background: #B9B9B9;*/
  31. border-right: 1px solid #8f949a;
  32. }
  33. .vsplitbar:hover, .vsplitbar.active {
  34. background: #8f949a;
  35. }
  36. #rightPanel {
  37. background-color: White;
  38. }
  39. /*#leftPanel {
  40. min-width: 120px;
  41. }*/
  42. .splitterMask {
  43. position:absolute;
  44. top: 0;
  45. left: 0;
  46. width: 100%;
  47. height: 100%;
  48. overflow: hidden;
  49. background-image: url(resources/images/transparent.gif);
  50. z-index: 20000;
  51. }
  52. </style>
  53. <script type="text/javascript" language="JavaScript"><!--
  54. var SITEMAP_COLLAPSE_VAR_NAME = 'c';
  55. var PLUGIN_VAR_NAME = 'g';
  56. var FOOTNOTES_VAR_NAME = 'fn';
  57. var ADAPTIVE_VIEW_VAR_NAME = 'view';
  58. var lastLeftPanelWidth = 295;
  59. var toolBarOnly = true;
  60. // isolate scope
  61. (function() {
  62. setUpController();
  63. var configuration = $axure.document.configuration;
  64. var _settings = {};
  65. _settings.projectId = configuration.prototypeId;
  66. _settings.isAxshare = configuration.isAxshare;
  67. _settings.loadFeedbackPlugin = configuration.loadFeedbackPlugin;
  68. var cHash = getHashStringVar(SITEMAP_COLLAPSE_VAR_NAME);
  69. _settings.startCollapsed = cHash == "1";
  70. if(cHash == "2") closePlayer();
  71. var gHash = getHashStringVar(PLUGIN_VAR_NAME);
  72. if(gHash == "") gHash = 1;
  73. _settings.startPluginGid = gHash;
  74. $axure.player.settings = _settings;
  75. $(window).bind('load', function() {
  76. if(CHROME_5_LOCAL && !$('body').attr('pluginDetected')) {
  77. window.location = 'resources/chrome/chrome.html';
  78. }
  79. });
  80. $(document).ready(function() {
  81. $axure.page.bind('load.start', mainFrame_onload);
  82. $axure.messageCenter.addMessageListener(messageCenter_message);
  83. $(document).on('pluginShown', function (event, data) {
  84. setVarInCurrentUrlHash('g', data ? data : '');
  85. });
  86. $(document).on('pluginCreated', function(event, data) {
  87. if($axure.player.settings.startPluginGid == data) {
  88. $axure.player.showPlugin(data);
  89. }
  90. });
  91. if($axure.player.settings.loadFeedbackPlugin) {
  92. if($axure.player.settings.isAxshare) {
  93. $axure.utils.loadJS('/Scripts/plugins/feedback/feedback8.js');
  94. } else {
  95. $axure.utils.loadJS('http://share.axure.com/Scripts/plugins/feedback/feedback8.js');
  96. }
  97. }
  98. if(navigator.userAgent.indexOf("MSIE") >= 0) $('#outerContainer').width('100%');
  99. initialize();
  100. if($axure.player.settings.startCollapsed) $('#outerContainer').splitter({ sizeLeft: 0 });
  101. else $('#outerContainer').splitter({ sizeLeft: lastLeftPanelWidth });
  102. $('#leftPanel').width(lastLeftPanelWidth);
  103. $(window).resize(function() { resizeContent(); });
  104. $('#maximizePanelContainer').hide();
  105. initializeLogo();
  106. $(window).resize();
  107. resizeContent();
  108. $axure.player.collapseToBar();
  109. if($axure.player.settings.startCollapsed) {
  110. collapse();
  111. $('#leftPanel').width(0);
  112. }
  113. if(MOBILE_DEVICE) {
  114. $('#interfaceControlFrameMinimizeContainer').height('45px');
  115. $('#interfaceControlFrameMinimizeContainer a').height('45px');
  116. $('#interfaceControlFrameHeaderContainer').css('margin-top','45px');
  117. $('#interfaceControlFrameCloseContainer a').css('padding','10px 0px');
  118. $('#maximizePanelContainer').height('45px');//.css('top','inherit').css('bottom','0px');
  119. $('body').removeClass('hashover');
  120. if(IOS) {
  121. $('#rightPanel').css('overflow', 'auto').css('-webkit-overflow-scrolling', 'touch').css('-ms-overflow-x', 'hidden');
  122. window.addEventListener("orientationchange", function() {
  123. var viewport = document.querySelector("meta[name=viewport]");
  124. //so iOS doesn't zoom when switching back to portrait
  125. viewport.setAttribute('content', 'width=device-width, initial-scale=1.0, maximum-scale=1.0');
  126. viewport.setAttribute('content', 'width=device-width, initial-scale=1.0');
  127. resizeContent();
  128. }, false);
  129. $axure.page.bind('load.start', function() {
  130. resizeContent();
  131. });
  132. }
  133. }
  134. });
  135. function initialize() {
  136. var legacyQString = getQueryString("Page");
  137. if (legacyQString.length > 0) {
  138. location.href = location.href.substring(0, location.href.indexOf("?")) + "#p=" + legacyQString;
  139. return;
  140. }
  141. var mainFrame = document.getElementById("mainFrame");
  142. mainFrame.contentWindow.location.href = getInitialUrl();
  143. }
  144. function initializeLogo() {
  145. if($axure.document.configuration.logoImagePath) {
  146. var image = new Image();
  147. image.onload = function() {
  148. $('#logoImage').css('max-width', this.width + 'px');
  149. $axure.player.resizeContent();
  150. };
  151. image.src = $axure.document.configuration.logoImagePath;
  152. $('#interfaceControlFrameLogoImageContainer').html('<img id="logoImage" src="" />');
  153. $('#logoImage').attr('src', $axure.document.configuration.logoImagePath).load(function() { resizeContent(); });
  154. } else $('#interfaceControlFrameLogoImageContainer').hide();
  155. if ($axure.document.configuration.logoImageCaption) {
  156. $('#interfaceControlFrameLogoCaptionContainer').html($axure.document.configuration.logoImageCaption);
  157. } else $('#interfaceControlFrameLogoCaptionContainer').hide();
  158. if(!$('#interfaceControlFrameLogoImageContainer').is(':visible') && !$('#interfaceControlFrameLogoCaptionContainer').is(':visible')) {
  159. $('#interfaceControlFrameLogoContainer').hide();
  160. }
  161. }
  162. var resizeContent = $axure.player.resizeContent = function() {
  163. var newHeight = $(window).height();
  164. var newWidth = $(window).width();
  165. var controlContainerHeight = newHeight;// - 30;
  166. if($('#interfaceControlFrameLogoContainer').is(':visible')) controlContainerHeight -= $('#interfaceControlFrameLogoContainer').outerHeight();// + 16;
  167. $('#outerContainer').height(newHeight).width(newWidth);
  168. $('.vsplitbar').height(newHeight);
  169. $('#leftPanel').height(newHeight);
  170. $('#interfaceControlFrame').height(newHeight);
  171. $('#interfaceControlFrameContainer').height(newHeight);
  172. $('#interfaceControlFrameHostContainer').height(controlContainerHeight);
  173. $('#rightPanel').height(newHeight);
  174. $('#mainFrame').height(newHeight);
  175. if($('#leftPanel').is(':visible')) $('#rightPanel').width($(window).width() - $('#leftPanel').width() - 1);// $('.vsplitbar').width());
  176. else $('#rightPanel').width($(window).width());
  177. $(document).trigger('ContainerHeightChange',[controlContainerHeight]);
  178. if(MOBILE_DEVICE) {
  179. if(!(getHashStringVar(ADAPTIVE_VIEW_VAR_NAME).length > 0)) $axure.messageCenter.postMessage('setAdaptiveViewForSize', {'width':newWidth, 'height':$('#rightPanel').height()});
  180. }
  181. }
  182. var collapseToBar = $axure.player.collapseToBar = function() {
  183. lastLeftPanelWidth = $('#leftPanel').width();
  184. $('#leftPanel').width('55px');
  185. $('.vsplitbar').hide();
  186. $('#rightPanel').width($(window).width() - $('#leftPanel').width());
  187. $(window).resize();
  188. $('#outerContainer').trigger('resize');
  189. toolBarOnly = true;
  190. }
  191. var expandFromBar = $axure.player.expandFromBar = function() {
  192. if($('.vsplitbar').is(':visible')) return;
  193. $('#leftPanel').width(lastLeftPanelWidth);
  194. $('.vsplitbar').show();
  195. $('#rightPanel').width($(window).width() - $('#leftPanel').width() - 1);// $('.vsplitbar').width());
  196. $(window).resize();
  197. $('#outerContainer').trigger('resize');
  198. toolBarOnly = false;
  199. }
  200. })();
  201. function messageCenter_message(message, data) {
  202. if(message == 'expandFrame') expand();
  203. else if(message == 'getCollapseFrameOnLoad' && $axure.player.settings.startCollapsed && !MOBILE_DEVICE) $axure.messageCenter.postMessage('collapseFrameOnLoad');
  204. }
  205. function getInitialUrl() {
  206. var pageName = getHashStringVar("p");
  207. if(pageName.length > 0) return pageName + ".html";
  208. else {
  209. var url = getFirstPageUrl($axure.document.sitemap.rootNodes);
  210. return (url ? url : "about:blank");
  211. }
  212. }
  213. function getFirstPageUrl(nodes) {
  214. for (var i = 0; i < nodes.length; i++) {
  215. var node = nodes[i];
  216. if (node.url) return node.url;
  217. else {
  218. var hasChildren = (node.children && node.children.length > 0);
  219. if (hasChildren) {
  220. var url = getFirstPageUrl(node.children);
  221. if (url) return url;
  222. }
  223. }
  224. }
  225. return null;
  226. }
  227. function closePlayer() {
  228. if($axure.page.location) window.location.href = $axure.page.location;
  229. else {
  230. var pageFile = getInitialUrl();
  231. var currentLocation = window.location.toString();
  232. window.location.href = currentLocation.substr(0, currentLocation.lastIndexOf("/") + 1) + pageFile;
  233. }
  234. }
  235. function replaceHash(newHash) {
  236. var currentLocWithoutHash = window.location.toString().split('#')[0];
  237. //We use replace so that every hash change doesn't get appended to the history stack.
  238. //We use replaceState in browsers that support it, else replace the location
  239. if(typeof window.history.replaceState != 'undefined') {
  240. try {
  241. //Chrome 45 (Version 45.0.2454.85 m) started throwing an error here when generated locally (this only happens with sitemap open) which broke all interactions.
  242. //try catch breaks the url adjusting nicely when the sitemap is open, but all interactions and forward and back buttons work.
  243. //Uncaught SecurityError: Failed to execute 'replaceState' on 'History': A history state object with URL 'file:///C:/Users/Ian/Documents/Axure/HTML/Untitled/start.html#p=home' cannot be created in a document with origin 'null'.
  244. window.history.replaceState(null, null, currentLocWithoutHash + newHash);
  245. } catch(ex) {}
  246. } else {
  247. window.location.replace(currentLocWithoutHash + newHash);
  248. }
  249. }
  250. function collapse() {
  251. setVarInCurrentUrlHash('c', 1);
  252. if(!toolBarOnly) lastLeftPanelWidth = $('#leftPanel').width();
  253. $('#maximizePanelContainer').show();
  254. $('#leftPanel').hide();
  255. $('.vsplitbar').hide();
  256. $('#rightPanel').width($(window).width());
  257. $(window).resize();
  258. $('#outerContainer').trigger('resize');
  259. $(document).trigger('sidebarCollapse');
  260. if(MOBILE_DEVICE) {
  261. $('#maximizePanelContainer').animate({
  262. top:$('#rightPanel').height() - $('#maximizePanelContainer').height()
  263. }, 300, 'swing', function() {
  264. $('#maximizePanelContainer').css('top', 'inherit').css('bottom', '0px');
  265. });
  266. }
  267. }
  268. function expand() {
  269. if(MOBILE_DEVICE) {
  270. $('#maximizePanelContainer').css('top', '0px').css('bottom', 'inherit');
  271. }
  272. deleteVarFromCurrentUrlHash('c');
  273. $('#maximizePanelContainer').hide();
  274. $('#leftPanel').width(lastLeftPanelWidth);
  275. $('#leftPanel').show();
  276. if(!toolBarOnly) {
  277. $('.vsplitbar').show();
  278. $('#rightPanel').width($(window).width() - $('#leftPanel').width() - 1);
  279. } else {
  280. $axure.player.collapseToBar();
  281. }
  282. $(window).resize();
  283. $('#outerContainer').trigger('resize');
  284. $(document).trigger('sidebarExpanded');
  285. }
  286. function mainFrame_onload() {
  287. if($axure.page.pageName) document.title = $axure.page.pageName;
  288. }
  289. function getQueryString(query) {
  290. var qstring = self.location.href.split("?");
  291. if(qstring.length < 2) return "";
  292. return GetParameter(qstring, query);
  293. }
  294. function GetParameter(qstring, query) {
  295. var prms = qstring[1].split("&");
  296. var frmelements = new Array();
  297. var currprmeter, querystr = "";
  298. for(var i = 0; i < prms.length; i++) {
  299. currprmeter = prms[i].split("=");
  300. frmelements[i] = new Array();
  301. frmelements[i][0] = currprmeter[0];
  302. frmelements[i][1] = currprmeter[1];
  303. }
  304. for(j = 0; j < frmelements.length; j++) {
  305. if(frmelements[j][0].toLowerCase() == query.toLowerCase()) {
  306. querystr = frmelements[j][1];
  307. break;
  308. }
  309. }
  310. return querystr;
  311. }
  312. function getHashStringVar(query) {
  313. var qstring = self.location.href.split("#");
  314. if(qstring.length < 2) return "";
  315. return GetParameter(qstring, query);
  316. }
  317. function setHashStringVar(currentHash, varName, varVal) {
  318. var varWithEqual = varName + '=';
  319. var poundVarWithEqual = varVal === '' ? '' : '#' + varName + '=' + varVal;
  320. var ampVarWithEqual = varVal === '' ? '' : '&' + varName + '=' + varVal;
  321. var hashToSet = '';
  322. var pageIndex = currentHash.indexOf('#' + varWithEqual);
  323. if(pageIndex == -1) pageIndex = currentHash.indexOf('&' + varWithEqual);
  324. if(pageIndex != -1) {
  325. var newHash = currentHash.substring(0, pageIndex);
  326. newHash = newHash == '' ? poundVarWithEqual : newHash + ampVarWithEqual;
  327. var ampIndex = currentHash.indexOf('&', pageIndex + 1);
  328. if(ampIndex != -1) {
  329. newHash = newHash == '' ? '#' + currentHash.substring(ampIndex + 1) : newHash + currentHash.substring(ampIndex);
  330. }
  331. hashToSet = newHash;
  332. } else if(currentHash.indexOf('#') != -1) {
  333. hashToSet = currentHash + ampVarWithEqual;
  334. } else {
  335. hashToSet = poundVarWithEqual;
  336. }
  337. if(hashToSet != '' || varVal == '') {
  338. return hashToSet;
  339. }
  340. return null;
  341. }
  342. function setVarInCurrentUrlHash(varName, varVal) {
  343. var newHash = setHashStringVar(window.location.hash, varName, varVal);
  344. if(newHash != null) {
  345. replaceHash(newHash);
  346. }
  347. }
  348. function deleteHashStringVar(currentHash, varName) {
  349. var varWithEqual = varName + '=';
  350. var pageIndex = currentHash.indexOf('#' + varWithEqual);
  351. if(pageIndex == -1) pageIndex = currentHash.indexOf('&' + varWithEqual);
  352. if(pageIndex != -1) {
  353. var newHash = currentHash.substring(0, pageIndex);
  354. var ampIndex = currentHash.indexOf('&', pageIndex + 1);
  355. //IF begin of string....if none blank, ELSE # instead of & and rest
  356. //IF in string....prefix + if none blank, ELSE &-rest
  357. if(newHash == '') { //beginning of string
  358. newHash = ampIndex != -1 ? '#' + currentHash.substring(ampIndex + 1) : '';
  359. } else { //somewhere in the middle
  360. newHash = newHash + (ampIndex != -1 ? currentHash.substring(ampIndex) : '');
  361. }
  362. return newHash;
  363. }
  364. return null;
  365. }
  366. function deleteVarFromCurrentUrlHash(varName) {
  367. var newHash = deleteHashStringVar(window.location.hash, varName);
  368. if(newHash != null) {
  369. replaceHash(newHash);
  370. }
  371. }
  372. --></script>
  373. <link type="text/css" rel="Stylesheet" href="plugins/sitemap/styles/sitemap.css" />
  374. <script type="text/javascript" src="plugins/sitemap/sitemap.js"></script>
  375. <link type="text/css" rel="Stylesheet" href="plugins/page_notes/styles/page_notes.css" />
  376. <script type="text/javascript" src="plugins/page_notes/page_notes.js"></script>
  377. <!--<link type="text/css" rel="Stylesheet" href="plugins/recordplay/styles/recordplay.css" />
  378. <script type="text/javascript" src="plugins/recordplay/recordplay.js"></script>-->
  379. <link type="text/css" rel="Stylesheet" href="plugins/debug/styles/debug.css" />
  380. <script type="text/javascript" src="plugins/debug/debug.js"></script>
  381. </head>
  382. <body scroll="no" class="hashover">
  383. <div id="outerContainer">
  384. <div id="leftPanel">
  385. <div id="interfaceControlFrame">
  386. <div id="interfaceControlFrameMinimizeContainer">
  387. <a title="Collapse" id="interfaceControlFrameMinimizeButton" onclick="collapse();">&nbsp;</a>
  388. </div>
  389. <div id="interfaceControlFrameHeaderContainer">
  390. <ul id="interfaceControlFrameHeader"></ul>
  391. </div>
  392. <div id="interfaceControlFrameContainer">
  393. <div id="interfaceControlFrameLogoContainer">
  394. <div id="interfaceControlFrameLogoImageContainer"></div>
  395. <div id="interfaceControlFrameLogoCaptionContainer"></div>
  396. </div>
  397. <div id="interfaceControlFrameHostContainer">
  398. </div>
  399. </div>
  400. <div id="interfaceControlFrameCloseContainer">
  401. <a title="Close" id="interfaceControlFrameCloseButton" onclick="closePlayer();">CLOSE</a>
  402. </div>
  403. </div>
  404. </div>
  405. <div id="rightPanel">
  406. <iframe id="mainFrame" name="mainFrame" width="100%" height="100%" src="" frameborder="0" style="display: block;" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
  407. </div>
  408. </div>
  409. <div id="maximizePanelContainer">
  410. <iframe id="expandFrame" src="resources/expand.html" width="100%" height="100%" scrolling="no" allowtransparency="true" frameborder="0"></iframe>
  411. </div>
  412. </body>
  413. </html>