start.html 21 KB

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