corrade-nucleus-nucleons – Diff between revs 20 and 27

Subversion Repositories:
Rev:
Show entire fileIgnore whitespace
Rev 20 Rev 27
Line 14... Line 14...
14   14  
15 <!-- Bootstrap core CSS --> 15 <!-- Bootstrap core CSS -->
16 <link href="/node_modules/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet" type="text/css"> 16 <link href="/node_modules/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet" type="text/css">
17 <!-- Corrade Nucleus Fonts --> 17 <!-- Corrade Nucleus Fonts -->
18 <link href="/css/nucleus/fonts.css" rel="stylesheet" type="text/css"> 18 <link href="/css/nucleus/fonts.css" rel="stylesheet" type="text/css">
19 <!-- Customized Nucleus style. --> 19 <!-- Customized bootstrap style. -->
-   20 <link href="/css/nucleus/nucleus.css" rel="stylesheet" type="text/css">
-   21 <!-- Manager for Windows. -->
20 <link href="/css/nucleus/nucleus.css" rel="stylesheet" type="text/css"> 22 <link href="/css/wm/wm.css" rel="stylesheet" type="text/css">
21 <!-- Script Kiddie style. --> 23 <!-- Script Kiddie style. -->
Line 22... Line 24...
22 <link href="/script-kiddie/css/style.css" rel="stylesheet" type="text/css"> 24 <link href="/script-kiddie/css/style.css" rel="stylesheet" type="text/css">
23 25
Line 118... Line 120...
118 <textarea id="message" class="form-control" rows="5" style="min-width: 100%; max-width: 100%; font-family: monospace; display: none;" readonly></textarea> 120 <textarea id="message" class="form-control" rows="5" style="min-width: 100%; max-width: 100%; font-family: monospace; display: none;" readonly></textarea>
119 </div> 121 </div>
120 </div> 122 </div>
121 </div> 123 </div>
Line -... Line 124...
-   124
-   125 <!-- Nucleons -->
-   126 <div class="panel panel-default draggable movable">
-   127 <div class="panel-heading">
-   128 <h3 class="panel-title">Nucleons</h3>
-   129 </div>
-   130 <div class="panel-body">
-   131 <div id="nucleons" class="row"></div>
-   132 </div>
-   133 </div>
122 134
Line 123... Line 135...
123 </div> <!-- /container --> 135 </div> <!-- /container -->
124 136
125 <footer class="footer"> 137 <footer class="footer">
Line 126... Line 138...
126 <p>&copy; 2017 Wizardry and Steamworks</p> 138 <p>&copy; 2017 Wizardry and Steamworks</p>
127 </footer> 139 </footer>
-   140  
-   141 <!-- jQuery -->
128   142 <script src="/node_modules/jquery/dist/jquery.min.js" type="text/javascript"></script>
129 <!-- jQuery --> 143 <!-- Wizardry and Steamworks JavaScript Includes -->
130 <script src="/node_modules/jquery/dist/jquery.min.js" type="text/javascript"></script> 144 <script src="/node_modules/was/dist/was.min.js" type="text/javascript"></script>
131 <!-- Bootstrap Javascript --> 145 <!-- Bootstrap Javascript -->
132 <script src="/node_modules/bootstrap/dist/js/bootstrap.min.js" type="text/javascript"></script> 146 <script src="/node_modules/bootstrap/dist/js/bootstrap.min.js" type="text/javascript"></script>
Line 140... Line 154...
140 <!-- Beautify.JS --> 154 <!-- Beautify.JS -->
141 <script src="/script-kiddie/node_modules/js-beautify/js/lib/beautify.js" type="text/javascript"></script> 155 <script src="/script-kiddie/node_modules/js-beautify/js/lib/beautify.js" type="text/javascript"></script>
142 <!-- Velocity --> 156 <!-- Velocity -->
143 <script src="/script-kiddie/node_modules/velocity-animate/velocity.min.js" type="text/javascript"></script> 157 <script src="/script-kiddie/node_modules/velocity-animate/velocity.min.js" type="text/javascript"></script>
144 <!-- Interact JS --> 158 <!-- Interact JS -->
145 <script src="/script-kiddie/node_modules/interactjs/dist/interact.min.js" type="text/javascript"></script> 159 <script src="/node_modules/interactjs/dist/interact.min.js" type="text/javascript"></script>
146 <!-- Wizardry and Steamworks JavaScript Includes --> 160 <!-- Manager for Windows. -->
-   161 <script src="/js/wm/wm.js" type="text/javascript"></script>
-   162 <!-- Nucleons Loader -->
147 <script src="/node_modules/was/dist/was.min.js" type="text/javascript"></script> 163 <script src="/js/nucleus/load-nucleons.js" type="text/javascript"></script>
148 <script> 164 <script>
149 $(document).ready(() => { 165 $(document).ready(() => {
150 // Auto-complete. 166 // Auto-complete.
151 ace.require("ace/ext/language_tools"); 167 ace.require("ace/ext/language_tools");
Line 377... Line 393...
377 // Save script on change. 393 // Save script on change.
378 editor.getSession().on('change', function(e) { 394 editor.getSession().on('change', function(e) {
379 localStorage.setItem('nucleus-script-kiddie-script-body', editor.getSession().getValue()); 395 localStorage.setItem('nucleus-script-kiddie-script-body', editor.getSession().getValue());
380 }); 396 });
Line 381... Line -...
381 -  
382 // Move windows to top on click. -  
383 $('.draggable').click(function() { -  
384 $(this).css('z-index', getTopWindowIndex() + 1); -  
385 }); -  
386 -  
387 // target elements with the "draggable" class -  
388 interact('.draggable') -  
389 .draggable({ -  
390 // enable inertial throwing -  
391 inertia: true, -  
392 // keep the element within the area of it's parent -  
393 /*restrict: { -  
394 // Let the user move the windows freely. -  
395 restriction: "self", -  
396 endOnly: true//, -  
397 //elementRect: { top: 0, left: 0, bottom: 1, right: 1 } -  
398 },*/ -  
399 -  
400 // enable autoScroll -  
401 autoScroll: true, -  
402 -  
403 onmove: dragMoveListener, -  
404 onend: function (event) { -  
405 event.target.style.opacity = 1; -  
406 }, -  
407 onstart: function(event) { -  
408 // Move windows to top on drag. -  
409 event.target.style.zIndex = getTopWindowIndex() + 1; -  
410 event.target.style.opacity = 0.5; -  
411 } -  
412 }) -  
413 .allowFrom('.panel-heading') -  
414 .ignoreFrom('a, input, button, textarea'); -  
415 -  
416 function getTopWindowIndex() { -  
417 return Math.max.apply(null, -  
418 $.map($('.draggable'), function(e, n) { -  
419 if ($(e).css('position') != 'static') -  
420 return parseInt($(e).css('z-index')) || 1; -  
421 }) -  
422 ); -  
423 } -  
424   -  
425 function dragMoveListener (event) { -  
426 var target = event.target, -  
427 // keep the dragged position in the data-x/data-y attributes -  
428 x = (parseFloat(target.getAttribute('data-x')) || 0) + event.dx, -  
429 y = (parseFloat(target.getAttribute('data-y')) || 0) + event.dy; -  
430   -  
431 // translate the element -  
432 target.style.webkitTransform = -  
433 target.style.transform = -  
434 'translate(' + x + 'px, ' + y + 'px)'; -  
435   -  
436 // update the posiion attributes -  
437 target.setAttribute('data-x', x); -  
438 target.setAttribute('data-y', y); -  
439 } -  
440   -  
441 // this is used later in the resizing and gesture demos -  
442 window.dragMoveListener = dragMoveListener; -  
443 397
444 // Get the item name from the storage. 398 // Get the item name from the storage.
445 var storeScriptUUID = localStorage.getItem('nucleus-script-kiddie-script-UUID'); 399 var storeScriptUUID = localStorage.getItem('nucleus-script-kiddie-script-UUID');
446 if (typeof storeScriptUUID == "string") 400 if (typeof storeScriptUUID == "string")