index.html 22 KB

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