diff --git a/Gruntfile.js b/Gruntfile.js
index fcbee2c..ee98f05 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -16,34 +16,34 @@ module.exports = function(grunt) {
},
js: {
src: [
- 'js_src/Events.js',
- 'js_src/Class.js',
- 'js_src/Button.js',
- 'js_src/Popup.js',
- 'js_src/btnMove.js',
- 'js_src/WordArt.js',
- 'js_src/Shape.js',
- 'js_src/Svg.js',
- 'js_src/Keyboard.js',
- 'js_src/SettingsWindow.js',
- 'js_src/UpdatePanel.js',
- 'js_src/PrinterPanel.js',
- 'js_src/Help.js',
- 'js_src/d3dServerInterfacing.js',
- 'js_src/verticalShapes.js',
- 'js_src/buttonbehaviors.js',
- 'js_src/canvasDrawing.js',
- 'js_src/previewRendering.js',
- 'js_src/gcodeGenerating.js',
- 'js_src/init_layout.js',
- 'js_src/Printer.js',
- 'js_src/Progressbar.js',
- 'js_src/Thermometer.js',
- 'js_src/utils.js',
- 'js_src/sidebar.js',
- 'js_src/Message.js',
- 'js_src/main.js',
- 'js_src/sketches.js'
+ 'js/Events.js',
+ 'js/Class.js',
+ 'js/Button.js',
+ 'js/Popup.js',
+ 'js/btnMove.js',
+ 'js/WordArt.js',
+ 'js/Shape.js',
+ 'js/Svg.js',
+ 'js/Keyboard.js',
+ 'js/SettingsWindow.js',
+ 'js/UpdatePanel.js',
+ 'js/PrinterPanel.js',
+ 'js/Help.js',
+ 'js/d3dServerInterfacing.js',
+ 'js/verticalShapes.js',
+ 'js/buttonbehaviors.js',
+ 'js/canvasDrawing.js',
+ 'js/previewRendering.js',
+ 'js/gcodeGenerating.js',
+ 'js/init_layout.js',
+ 'js/Printer.js',
+ 'js/Progressbar.js',
+ 'js/Thermometer.js',
+ 'js/utils.js',
+ 'js/sidebar.js',
+ 'js/Message.js',
+ 'js/main.js',
+ 'js/sketches.js'
],
dest: 'www/js/<%= pkg.name %>.js'
}
@@ -63,8 +63,8 @@ module.exports = function(grunt) {
}
},
jslibs: {
- cwd: "js_src/libs/",
-// src: ['js_src/libs/*.js', '!js_src/libs/*.min.js'], // source files mask
+ cwd: "js/libs/",
+// src: ['js/libs/*.js', '!js/libs/*.min.js'], // source files mask
src: ['*.js', '!*.min.js'], // source files mask
dest: 'www/js/libs/', // destination folder
expand: true, // allow dynamic building
@@ -112,12 +112,12 @@ module.exports = function(grunt) {
},
watch: {
javascript: {
- files: ["js_src/*", '!www/js/<%= pkg.name %>.min.js', '!www/js/<%= pkg.name %>.js'],
+ files: ["js/*", '!www/js/<%= pkg.name %>.min.js', '!www/js/<%= pkg.name %>.js'],
tasks: ["concat:js", "uglify:js"]
// tasks: ["jshint", "concat", "uglify"]
},
javascriptLibs: {
- files: ["js_src/libs/*"],
+ files: ["js/libs/*"],
tasks: ["uglify:jslibs"]
// tasks: ["jshint", "concat", "uglify"]
},
diff --git a/___settings.html b/___settings.html
deleted file mode 100644
index 601ea2d..0000000
--- a/___settings.html
+++ /dev/null
@@ -1,154 +0,0 @@
-
-
-
- settings
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/css_old/_backup20131010/d3d_btns.css b/css_old/_backup20131010/d3d_btns.css
deleted file mode 100644
index 1e60daa..0000000
--- a/css_old/_backup20131010/d3d_btns.css
+++ /dev/null
@@ -1,179 +0,0 @@
-/*.logo {
- background: #f5f5f5 url('../img/logo_full.png') no-repeat left top;
-}
-
-@media screen and (max-width: 500px) {
- .logo {
- background: #f5f5f5 url('../img/logo_small.png') no-repeat left top;
- }
-}*/
-
-/*body {*/
- /*-moz-user-select: none; *//* disable cut copy paste */
- /*-webkit-user-select: none; *//* disable cut copy paste */
- /*overflow:hidden; *//* This chops off any overhanging divs */
-/*}*/
-
-/*img {*/
- /*z-index: 5;*/
- /*pointer-events:none;*/
- /*-webkit-touch-callout: none; *//**//*disable callout, image save panel */
- /*-webkit-tap-highlight-color: transparent; *//**//* "turn off" link highlight */
-/*}*/
-
-/* http://stackoverflow.com/questions/5348092/prevent-default-press-but-not-default-drag-in-ios-mobilesafari */
-/*.btn {*/
- /*background-repeat: no-repeat;*/
-/* -webkit-user-select: none;*/
- /*cursor: pointer*/
-/*}*/
-
-/*
-
- INTERFACE BUTTONS
-
-*/
-/*
-#btnNew {
- left: 10px;
- top: 10px;
- width: 194px;
- height: 170px;
- background: url('../img/buttons/btnNew.png') no-repeat;
-}
-
-#btnPrevious {
- left: 20px;
- top: 180px;
- z-index: 10;
-}
-
-#btnNext {
- left: 126px;
- top: 186px;
- z-index: 10;
-}
-
-#btnSave {
- left: 20px;
- top: 240px;
-}
-
-#btnOops {
- left: 20px;
- top: 450px;
- width: 146px;
- height: 144px;
- background: url('../img/buttons/btnOops.png') no-repeat;
-}
-*/
-
-/*
-#btnPrint {
- right: 15px;
- top: 15px;
-}
-
-#btnStop {
- right: 20px;
- top: 200px;
-}
-
-#btnInfo {
- right: 25px;
- bottom: 90px;
-}
-
-#btnSettings {
- right: 25px;
- bottom: 20px;
-}
-*/
-
-
-
-/*
-
- DRAW AREA
-
-*/
-
-
-/*#drawAreaContainer > .manipulationBtns {*/
-/*
-.drawareacontainer > .manipulationBtns {
- margin: 5px;
-}
-
-.manipulationBtn {
- cursor: pointer;
-}
-
-#btnsUpDown {
- position: absolute;
- right: 200px;
- bottom: -75px;
-}
-#btnsUpDown > div {
- float: left;
- padding-right: 8px;
- background-repeat: no-repeat;
-}
-
-#btnsTurnLeftRight {
- position: absolute;
- right: 20px;
- bottom: -75px;
-}
-#btnsTurnLeftRight >div {
- float: left;
- padding-right: 8px;
- background-repeat: no-repeat;
-}
-
-#btnMoveUp {
- width: 65px;
- height: 61px;
- background: url('../img/buttons/btnUp.png');
-}
-
-#btnMoveDown {
- width: 64px;
- height: 63px;
- background: url('../img/buttons/btnDown.png');
-}
-
-#btnTwistLeft {
- width: 59px;
- height: 61px;
- background: url('../img/buttons/btnTurnLeft.png');
-}
-
-#btnTwistRight {
- width: 64px;
- height: 56px;
- background: url('../img/buttons/btnTurnRight.png');
-}
-*/
-
-/*
-#displayTemp {
- position: absolute;
- right: 55px;
- top: 334px;
- font-weight: bold;
- background: white;
- display:none;
-}
-*/
-
-/*
-.disabled {
- opacity: 0.3;
- cursor: default;
-}
-
-#btnStop.disabled {
- display: none;
-}
-*/
\ No newline at end of file
diff --git a/css_old/_backup20131010/fixedPosInterface.css b/css_old/_backup20131010/fixedPosInterface.css
deleted file mode 100644
index 881dd30..0000000
--- a/css_old/_backup20131010/fixedPosInterface.css
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
-#drawAreaContainer {
- position: absolute;
- top: 50%;
- left: 50%;
- background-color: #fff;
- width: 65%;
- min-width: 500px;
- max-width: 650px;
- height: 60%;
- min-height: 150px;
- max-height: 450px;
- border: 4px solid #000;
- border-radius: 15px;
- overflow: hidden;
- z-index: 15;
- display: none;
-}
-
-#canvasContainers {
- display:table;
- position: absolute;
- top: 0;
- bottom: 0;
- left: 0;
- right: 0;
- width: 100%;
- height: 100%;
- padding: 0;
- margin: 0;
-}
-
-#mycanvasContainer {
- display:table-cell;
- width: auto;
- height: 100%;
-}
-#mycanvas {
- width: 100%;
- height: 100%;
- margin: 0;
- padding: 0;
- border-right: 2px solid #333;
-}
-
-#previewContainer {
- display:table-cell;
- width: 150px;
- height: 100%;
-}
-#preview {
- width: 150px;
- height: 100%;
- float: right;
- margin: 0;
- padding: 0;
-}
-*/
-
-/* DEBUG THING */
-/*
-#preview_tmp {
- position: absolute;
- top: 0px;
- left: 0px;
- z-index: 500;
- border: 1px solid #f80;
- display: none;
-}
-*/
-
-/*
-
- Buttons and logo's
-
-*/
-/*
-.button {
- display: table;
-}
-*/
-
-/*#d3dlogo {*/
- /*position: absolute;*/
- /*top: 15px;*/
- /*left: 31%;*/
- /*width: 399px;*/
- /*height: 139px;*/
- /*background-image: url('../img/logo_full.png');*/
- /*cursor: pointer;*/
-/*}*/
-
-
diff --git a/css_old/_backup20131010/settingsPopup.css b/css_old/_backup20131010/settingsPopup.css
deleted file mode 100644
index 95b407b..0000000
--- a/css_old/_backup20131010/settingsPopup.css
+++ /dev/null
@@ -1,74 +0,0 @@
-#contentOverlay {
- background-color: rgba(255, 255, 255, 0.65);
- z-index: 20;
- position: absolute;
- top: 0px;
- left: 0px;
- width: 100%;
- height: 100%;
- display:none;
-}
-#settings {
- background-color: #fff;
- z-index: 15;
-
- position: absolute;
- top: 50%;
- left: 50%;
- width: 835px;
- height: 500px;
- margin: -250px 0 0 -417.5px;
- /*padding: 25px;*/
-
- /*overflow: scroll;*/
- /*overflow-y: hidden;*/
- -moz-box-shadow: 0px 2px 6px 0px rgba(16, 16, 16, 0.65);
- -webkit-box-shadow: 0px 2px 6px 0px rgba(16, 16, 16, 0.65);
- box-shadow: 0px 2px 6px 0px rgba(16, 16, 16, 0.65);
- border: 2px solid #222;
- border-radius: 15px;
- -moz-border-radius: 15px;
- -webkit-border-radius: 15px;
- overflow: hidden;
-}
-#settings header {
- margin: 25px 25px 0 25px;
- height: 44px;
-}
-
-div.content {
- margin: 15px 25px 25px 25px;
- height: 388px;
- display: table;
-}
-
-div.content > div {
- height: 100%;
-}
-
-div.content > div.settings {
- border: 1px solid rgb(187, 187, 187);
- -webkit-border-radius: 5px;
- -moz-border-radius: 5px;
- border-radius: 5px;
-
- width: 660px;
- overflow: scroll;
- max-height: 368px;
- overflow-x: hidden;
- padding: 10px 10px 10px 10px;
-}
-div.content > div.manipulationBtns {
- display: table-cell;
- vertical-align: bottom;
- width: 125px;
-
-}
-
-div.content .btnOK {
- width: 85px;
- height: 86px;
- background: url('../img/buttons/btnOk_settings.png') no-repeat;
- margin: 0 0 0 10px;
- cursor: pointer;
-}
diff --git a/css_old/_backup20131011/fixedPosInterface.css b/css_old/_backup20131011/fixedPosInterface.css
deleted file mode 100644
index eb071f2..0000000
--- a/css_old/_backup20131011/fixedPosInterface.css
+++ /dev/null
@@ -1,329 +0,0 @@
-body {
-/* This chops off any overhanging divs */
- overflow:hidden;
-}
-
-.button {
- display: table;
-}
-
-/*#landscape {*/
- /*position:relative;*/
- /*width: 1024px;*/
- /*max-height: 768px;*/
- /*background-color: #808;*/
- /*border: 10px solid #ff0;*/
- /*margin: 0px auto;*/
-/*}*/
-
-
-#verticalShapes {
- position:absolute;
- right: -56px;
- bottom: 15px;
- /*background-color: #fff;*/
-}
-
-.verticalshape {
- width: 50px;
- height: 50px;
- border: 2px solid #333;
- border-radius: 0px 5px 5px 0px;
- margin-top: 4px;
- /*background-color: #f0f;*/
- cursor: pointer;
-}
-
-.straight {
- background: url('../img/vertical_shape_icons/straight.png') no-repeat;
-}
-.diverging {
- background: url('../img/vertical_shape_icons/diverging.png') no-repeat;
-}
-.converging {
- background: url('../img/vertical_shape_icons/converging.png') no-repeat;
-}
-.sinus {
- background: url('../img/vertical_shape_icons/sinus.png') no-repeat;
-}
-
-
-/* Portrait */
-@media screen and (orientation:portrait) {
- body {
-/* background-color: #08F;*/
- }
-
- #landscape {
- display: none;
- }
- #portrait {
- display: block;
- }
-}
- /* Landscape */
-@media screen and (orientation:landscape) {
- body {
-/* background-color: #8F0;*/
- }
-
- #landscape {
- display: block;
- }
- #portrait {
- display: none;
- }
-}
-
-.uiButtonsContainer {
- position: fixed;
- top: 0px;
- left: 0px;
- width: 1024px;
- min-height: 500px;
- max-height: 768px;
- height: 100%;
- /* height: 768px;*/
-}
-.uiButtonsContainer:before {
- content:' ';
- display:block;
- position:absolute;
- left:0;
- top:0;
- right:0;
- bottom:0;
- border: 2px solid #333;
-}
-
-#d3dlogo {
- position: absolute;
- top: 15px;
- left: 31%;
- width: 399px;
- height: 139px;
- background-image: url('../img/logo_full.png');
- cursor: pointer;
-}
-
-#drawAreaContainer {
- position: absolute;
- top: 193px;
- left: 193px;
- width: 650px;
- height: 450px;
- background-color: #fff;
- border: 4px solid #000;
- border-radius: 15px;
-}
-
-#preview_tmp {
- position: absolute;
- top: 0px;
- left: 0px;
- z-index: 500;
- border: 1px solid #f80;
- display: none;
-}
-
-#mycanvas, #preview {
- /*border: 1px solid #08c;*/
- float: left;
-}
-
-#mycanvas {
- width: 500px;
- height: 450px;
- border: 0px solid #333;
- border-right: 2px solid #333;
-}
-
-#preview {
- /*border: 1px solid #f8c;*/
- position: absolute;
- right: 0px;
- top: 0px;
- width: 150px;
- height: 450px;
-}
-
-.vertImage {
- margin: 0px;
- padding: 0px;
- /*border: 2px solid #f0f;*/
- max-width: 100%;
- height: auto;
- width: auto; /* for ie9 */
-}
-
-
-.bgTop {
- position: absolute;
- top: 0px;
- left: 0px;
- z-index: -5;
-}
-.bgMiddle {
- display: block;
- position: absolute;
- top: 30%;
- left: 0px;
- z-index: -5;
-}
-.bgBottom {
- position: absolute;
- bottom: 0px;
- left: 0px;
- z-index: -5;
-}
-
-/* PRINT PROGRESS DISPLAY */
-#printProgressContainer {
- position: absolute;
- right: 30px;
- top: 370px;
- width: 110px;
- margin: 5px 0px;
- font-weight: bold;
- display:none;
-}
-#progressbarContainer {
- margin: 3px 0px;
- width: inherit;
- height: 20px;
- background-color: #fff;
- border: 2px solid #333;
- border-radius: 5px;
- -o-border-radius: 5px;
- -moz-border-radius: 5px;
- -webkit-border-radius: 5px;
-}
-.progressAmount {
- margin: 0px 5px;
-}
-#progressbar {
- position: relative;
- /*margin-bottom: -20px;*/
- width: 0%;
- height: 100%;
- background-color: #4c4;
- border: 0px solid #f0f;
- border-radius: 3px;
- -o-border-radius: 3px;
- -moz-border-radius: 3px;
- -webkit-border-radius: 3px;
-}
-
-/* THERMOMETER */
-#thermometerContainer {
- position: absolute;
- right: 5px;
- top: 360px;
-}
-#thermometerCanvas {
- /*background: #59b2b8;*/
- /*zoom: 2;*/
-}
-
-
-/* The code below is for resizing UI elements as the viewport becomes less high (suitable for tablets & smartphones) */
-
-@media screen and (max-height: 675px) {
- .bgMiddle {
- display: none;
- }
-
- #d3dlogo {
- width: 399px;
- height: 74px;
- background-image: url('../img/logo_small.png');
- margin-top: 9px;
- }
-
- #btnsUpDown, #btnsTurnLeftRight {
- zoom: 0.94;
- -moz-transform: translate(0px,-5px) scale(.94);
- }
-
- #btnNew {
- zoom: 0.94;
- -moz-transform: translate(-5px,-5px) scale(.94);
- /*-moz-transform: translate(-3px,-3px);*/
- }
- #btnOops {
- zoom: 0.94;
- -moz-transform: translate(-5px,-10px) scale(0.94);
- }
-
- #btnPrint {
- right: 10px;
- top: 10px;
- -moz-transform: translate(5px,-5px);
- }
-
-
- .btn {
- zoom: 0.94;
- -moz-transform: scale(.94);
- }
-
- #drawAreaContainer {
- top: 128px;
- height: 350px;
- }
-}
-
-@media screen and (max-height: 560px) {
- #d3dlogo {
- width: 399px;
- height: 57px;
- background-image: url('../img/logo_smaller_wide.png');
- margin-top: 14px;
- /*zoom: 0.8;*/
- /*-moz-transform: translate(-20px,-15px) scale(.8);*/
- /*-moz-transform: ;*/
- /*left: 34%;*/
- }
-
- #btnsUpDown, #btnsTurnLeftRight {
- zoom: 0.86;
- -moz-transform: translate(0px,-7px) scale(0.86);
- }
-
- #btnPrint {
- right: 6px;
- -moz-transform: translate(10px,-10px);
- }
-
- #btnNew {
- zoom: 0.86;
- -moz-transform: translate(-10px,-10px) scale(.86);
- }
-
- .btn {
- zoom: 0.86;
- -moz-transform: scale(.86);
- }
-
- #btnOops {
- top: 350px;
- zoom: 0.86;
- -moz-transform: translate(-10px,-25px) scale(.86);
- }
- #btnSave {
- -moz-transform: translate(-5px,-13px);
- }
-
- #btnPrevious, #btnNext {
- /*top: 200px;*/
- -moz-transform: translate(-5px,-10px);
- }
-
- #drawAreaContainer {
- top: 110px;
- height: 350px;
- }
-}
-
-
-
diff --git a/css_old/_backup20131011/fixedPosInterface.css.BACKUP.99789.css b/css_old/_backup20131011/fixedPosInterface.css.BACKUP.99789.css
deleted file mode 100644
index eb071f2..0000000
--- a/css_old/_backup20131011/fixedPosInterface.css.BACKUP.99789.css
+++ /dev/null
@@ -1,329 +0,0 @@
-body {
-/* This chops off any overhanging divs */
- overflow:hidden;
-}
-
-.button {
- display: table;
-}
-
-/*#landscape {*/
- /*position:relative;*/
- /*width: 1024px;*/
- /*max-height: 768px;*/
- /*background-color: #808;*/
- /*border: 10px solid #ff0;*/
- /*margin: 0px auto;*/
-/*}*/
-
-
-#verticalShapes {
- position:absolute;
- right: -56px;
- bottom: 15px;
- /*background-color: #fff;*/
-}
-
-.verticalshape {
- width: 50px;
- height: 50px;
- border: 2px solid #333;
- border-radius: 0px 5px 5px 0px;
- margin-top: 4px;
- /*background-color: #f0f;*/
- cursor: pointer;
-}
-
-.straight {
- background: url('../img/vertical_shape_icons/straight.png') no-repeat;
-}
-.diverging {
- background: url('../img/vertical_shape_icons/diverging.png') no-repeat;
-}
-.converging {
- background: url('../img/vertical_shape_icons/converging.png') no-repeat;
-}
-.sinus {
- background: url('../img/vertical_shape_icons/sinus.png') no-repeat;
-}
-
-
-/* Portrait */
-@media screen and (orientation:portrait) {
- body {
-/* background-color: #08F;*/
- }
-
- #landscape {
- display: none;
- }
- #portrait {
- display: block;
- }
-}
- /* Landscape */
-@media screen and (orientation:landscape) {
- body {
-/* background-color: #8F0;*/
- }
-
- #landscape {
- display: block;
- }
- #portrait {
- display: none;
- }
-}
-
-.uiButtonsContainer {
- position: fixed;
- top: 0px;
- left: 0px;
- width: 1024px;
- min-height: 500px;
- max-height: 768px;
- height: 100%;
- /* height: 768px;*/
-}
-.uiButtonsContainer:before {
- content:' ';
- display:block;
- position:absolute;
- left:0;
- top:0;
- right:0;
- bottom:0;
- border: 2px solid #333;
-}
-
-#d3dlogo {
- position: absolute;
- top: 15px;
- left: 31%;
- width: 399px;
- height: 139px;
- background-image: url('../img/logo_full.png');
- cursor: pointer;
-}
-
-#drawAreaContainer {
- position: absolute;
- top: 193px;
- left: 193px;
- width: 650px;
- height: 450px;
- background-color: #fff;
- border: 4px solid #000;
- border-radius: 15px;
-}
-
-#preview_tmp {
- position: absolute;
- top: 0px;
- left: 0px;
- z-index: 500;
- border: 1px solid #f80;
- display: none;
-}
-
-#mycanvas, #preview {
- /*border: 1px solid #08c;*/
- float: left;
-}
-
-#mycanvas {
- width: 500px;
- height: 450px;
- border: 0px solid #333;
- border-right: 2px solid #333;
-}
-
-#preview {
- /*border: 1px solid #f8c;*/
- position: absolute;
- right: 0px;
- top: 0px;
- width: 150px;
- height: 450px;
-}
-
-.vertImage {
- margin: 0px;
- padding: 0px;
- /*border: 2px solid #f0f;*/
- max-width: 100%;
- height: auto;
- width: auto; /* for ie9 */
-}
-
-
-.bgTop {
- position: absolute;
- top: 0px;
- left: 0px;
- z-index: -5;
-}
-.bgMiddle {
- display: block;
- position: absolute;
- top: 30%;
- left: 0px;
- z-index: -5;
-}
-.bgBottom {
- position: absolute;
- bottom: 0px;
- left: 0px;
- z-index: -5;
-}
-
-/* PRINT PROGRESS DISPLAY */
-#printProgressContainer {
- position: absolute;
- right: 30px;
- top: 370px;
- width: 110px;
- margin: 5px 0px;
- font-weight: bold;
- display:none;
-}
-#progressbarContainer {
- margin: 3px 0px;
- width: inherit;
- height: 20px;
- background-color: #fff;
- border: 2px solid #333;
- border-radius: 5px;
- -o-border-radius: 5px;
- -moz-border-radius: 5px;
- -webkit-border-radius: 5px;
-}
-.progressAmount {
- margin: 0px 5px;
-}
-#progressbar {
- position: relative;
- /*margin-bottom: -20px;*/
- width: 0%;
- height: 100%;
- background-color: #4c4;
- border: 0px solid #f0f;
- border-radius: 3px;
- -o-border-radius: 3px;
- -moz-border-radius: 3px;
- -webkit-border-radius: 3px;
-}
-
-/* THERMOMETER */
-#thermometerContainer {
- position: absolute;
- right: 5px;
- top: 360px;
-}
-#thermometerCanvas {
- /*background: #59b2b8;*/
- /*zoom: 2;*/
-}
-
-
-/* The code below is for resizing UI elements as the viewport becomes less high (suitable for tablets & smartphones) */
-
-@media screen and (max-height: 675px) {
- .bgMiddle {
- display: none;
- }
-
- #d3dlogo {
- width: 399px;
- height: 74px;
- background-image: url('../img/logo_small.png');
- margin-top: 9px;
- }
-
- #btnsUpDown, #btnsTurnLeftRight {
- zoom: 0.94;
- -moz-transform: translate(0px,-5px) scale(.94);
- }
-
- #btnNew {
- zoom: 0.94;
- -moz-transform: translate(-5px,-5px) scale(.94);
- /*-moz-transform: translate(-3px,-3px);*/
- }
- #btnOops {
- zoom: 0.94;
- -moz-transform: translate(-5px,-10px) scale(0.94);
- }
-
- #btnPrint {
- right: 10px;
- top: 10px;
- -moz-transform: translate(5px,-5px);
- }
-
-
- .btn {
- zoom: 0.94;
- -moz-transform: scale(.94);
- }
-
- #drawAreaContainer {
- top: 128px;
- height: 350px;
- }
-}
-
-@media screen and (max-height: 560px) {
- #d3dlogo {
- width: 399px;
- height: 57px;
- background-image: url('../img/logo_smaller_wide.png');
- margin-top: 14px;
- /*zoom: 0.8;*/
- /*-moz-transform: translate(-20px,-15px) scale(.8);*/
- /*-moz-transform: ;*/
- /*left: 34%;*/
- }
-
- #btnsUpDown, #btnsTurnLeftRight {
- zoom: 0.86;
- -moz-transform: translate(0px,-7px) scale(0.86);
- }
-
- #btnPrint {
- right: 6px;
- -moz-transform: translate(10px,-10px);
- }
-
- #btnNew {
- zoom: 0.86;
- -moz-transform: translate(-10px,-10px) scale(.86);
- }
-
- .btn {
- zoom: 0.86;
- -moz-transform: scale(.86);
- }
-
- #btnOops {
- top: 350px;
- zoom: 0.86;
- -moz-transform: translate(-10px,-25px) scale(.86);
- }
- #btnSave {
- -moz-transform: translate(-5px,-13px);
- }
-
- #btnPrevious, #btnNext {
- /*top: 200px;*/
- -moz-transform: translate(-5px,-10px);
- }
-
- #drawAreaContainer {
- top: 110px;
- height: 350px;
- }
-}
-
-
-
diff --git a/css_old/_backup20131011/fixedPosInterface.css.BASE.99789.css b/css_old/_backup20131011/fixedPosInterface.css.BASE.99789.css
deleted file mode 100644
index 426497d..0000000
--- a/css_old/_backup20131011/fixedPosInterface.css.BASE.99789.css
+++ /dev/null
@@ -1,323 +0,0 @@
-body {
-/* This chops off any overhanging divs */
- overflow:hidden;
-}
-
-
-.button {
- display: table;
-}
-
-/*.big {*/
- /*background: #a6e19c;*/
- /*border: 1px solid #222;*/
- /*height: 64px;*/
- /*width: 64px;*/
- /*display: table-cell;*/
- /*vertical-align: middle;*/
- /*text-align: center;*/
- /*border-radius: 32px;*/
- /*-moz-border-radius: 32px;*/
- /*-webkit-border-radius: 32px;*/
-/*}*/
-/*.small {*/
- /*background: #a3d5f7;*/
- /*border: 1px solid #222;*/
- /*height: 40px;*/
- /*width: 40px;*/
- /*display: table-cell;*/
- /*vertical-align: middle;*/
- /*text-align: center;*/
- /*border-radius: 20px;*/
- /*-moz-border-radius: 20px;*/
- /*-webkit-border-radius: 20px;*/
-/*}*/
-
-#logo {
- position: absolute;
- /*left: 50%;*/
- /*margin-left: -220px;*/
- top: 20px;
- left: 315px;
- width: 400px;
- height: 140px;
-}
-
-/*ha {*/
- /*background: #f5f5f5 url('../images/bg.jpg') no-repeat;*/
-/*}*/
-
- /* Portrait */
-@media screen and (orientation:portrait) {
- body {
-/* background-color: #08F;*/
- }
-
- #landscape {
- display: none;
- }
- #portrait {
- display: block;
- }
-}
- /* Landscape */
-@media screen and (orientation:landscape) {
- body {
-/* background-color: #8F0;*/
- }
-
- #landscape {
- display: block;
- }
- #portrait {
- display: none;
- }
-}
-
-.container {
- position: fixed;
- top: 0px;
- left: 0px;
- border: 2px solid #333;
- width: 1024px;
- min-height: 500px;
- max-height: 768px;
- height: 100%;
-/* height: 768px;*/
-}
-
-#d3dlogo {
- position: absolute;
- top: 15px;
- left: 31%;
- width: 399px;
- height: 139px;
- background-image: url('../img/logo_full.png');
- cursor: pointer;
-}
-
-#svg {
- cursor: pointer;
-}
-
-#drawAreaContainer {
- position: absolute;
- top: 193px;
- left: 193px;
- width: 650px;
- height: 450px;
- background-color: #fff;
- border: 4px solid #000;
- border-radius: 15px;
-}
-
-#preview_tmp {
- position: absolute;
- top: 0px;
- left: 0px;
- z-index: 500;
- border: 1px solid #f80;
- display: none;
-}
-
-#mycanvas, #preview {
- /*border: 1px solid #08c;*/
- float: left;
-}
-
-#mycanvas {
- width: 500px;
- height: 450px;
- border: 0px solid #333;
- border-right: 2px solid #333;
-}
-
-#preview {
- /*border: 1px solid #f8c;*/
- position: absolute;
- right: 0px;
- top: 0px;
- width: 150px;
- height: 450px;
-}
-
-.vertImage {
- margin: 0px;
- padding: 0px;
- /*border: 2px solid #f0f;*/
- max-width: 100%;
- height: auto;
- width: auto; /* for ie9 */
-}
-
-
-.bgTop {
- position: absolute;
- top: 0px;
- left: 0px;
- z-index: -5;
-}
-.bgMiddle {
- display: block;
- position: absolute;
- top: 30%;
- left: 0px;
- z-index: -5;
-}
-.bgBottom {
- position: absolute;
- bottom: 0px;
- left: 0px;
- z-index: -5;
-}
-
-/* PRINT PROGRESS DISPLAY */
-#printProgressContainer {
- position: absolute;
- right: 30px;
- top: 370px;
- width: 110px;
- margin: 5px 0px;
- font-weight: bold;
- display:none;
-}
-#progressbarContainer {
- margin: 3px 0px;
- width: inherit;
- height: 20px;
- background-color: #fff;
- border: 2px solid #333;
- border-radius: 5px;
- -o-border-radius: 5px;
- -moz-border-radius: 5px;
- -webkit-border-radius: 5px;
-}
-.progressAmount {
- margin: 0px 5px;
-}
-#progressbar {
- position: relative;
- /*margin-bottom: -20px;*/
- width: 0%;
- height: 100%;
- background-color: #4c4;
- border: 0px solid #f0f;
- border-radius: 3px;
- -o-border-radius: 3px;
- -moz-border-radius: 3px;
- -webkit-border-radius: 3px;
-}
-
-/* THERMOMETER */
-#thermometerContainer {
- position: absolute;
- right: 25px;
- top: 370px;
-}
-#thermometerCanvas {
- /*background: #59b2b8;*/
- /*zoom: 2;*/
-}
-
-
-/* The code below is for resizing UI elements as the viewport becomes less high (suitable for tablets & smartphones) */
-
-@media screen and (max-height: 675px) {
- .bgMiddle {
- display: none;
- }
-
- #d3dlogo {
- width: 399px;
- height: 74px;
- background-image: url('../img/logo_small.png');
- margin-top: 9px;
- }
-
- #btnsUpDown, #btnsTurnLeftRight {
- zoom: 0.94;
- -moz-transform: translate(0px,-5px) scale(.94);
- }
-
- #btnNew {
- zoom: 0.94;
- -moz-transform: translate(-5px,-5px) scale(.94);
- /*-moz-transform: translate(-3px,-3px);*/
- }
- #btnOops {
- zoom: 0.94;
- -moz-transform: translate(-5px,-10px) scale(0.94);
- }
-
- #btnPrint {
- right: 10px;
- top: 10px;
- -moz-transform: translate(5px,-5px);
- }
-
-
- .btn {
- zoom: 0.94;
- -moz-transform: scale(.94);
- }
-
- #drawAreaContainer {
- top: 128px;
- height: 350px;
- }
-}
-
-@media screen and (max-height: 560px) {
- #d3dlogo {
- width: 399px;
- height: 57px;
- background-image: url('../img/logo_smaller_wide.png');
- margin-top: 14px;
- /*zoom: 0.8;*/
- /*-moz-transform: translate(-20px,-15px) scale(.8);*/
- /*-moz-transform: ;*/
- /*left: 34%;*/
- }
-
- #btnsUpDown, #btnsTurnLeftRight {
- zoom: 0.86;
- -moz-transform: translate(0px,-7px) scale(0.86);
- }
-
- #btnPrint {
- right: 6px;
- -moz-transform: translate(10px,-10px);
- }
-
- #btnNew {
- zoom: 0.86;
- -moz-transform: translate(-10px,-10px) scale(.86);
- }
-
- .btn {
- zoom: 0.86;
- -moz-transform: scale(.86);
- }
-
- #btnOops {
- top: 350px;
- zoom: 0.86;
- -moz-transform: translate(-10px,-25px) scale(.86);
- }
- #btnSave {
- -moz-transform: translate(-5px,-13px);
- }
-
- #btnPrevious, #btnNext {
- /*top: 200px;*/
- -moz-transform: translate(-5px,-10px);
- }
-
- #drawAreaContainer {
- top: 110px;
- height: 350px;
- }
-}
-
-
-
diff --git a/css_old/_backup20131011/fixedPosInterface.css.LOCAL.99789.css b/css_old/_backup20131011/fixedPosInterface.css.LOCAL.99789.css
deleted file mode 100644
index eb071f2..0000000
--- a/css_old/_backup20131011/fixedPosInterface.css.LOCAL.99789.css
+++ /dev/null
@@ -1,329 +0,0 @@
-body {
-/* This chops off any overhanging divs */
- overflow:hidden;
-}
-
-.button {
- display: table;
-}
-
-/*#landscape {*/
- /*position:relative;*/
- /*width: 1024px;*/
- /*max-height: 768px;*/
- /*background-color: #808;*/
- /*border: 10px solid #ff0;*/
- /*margin: 0px auto;*/
-/*}*/
-
-
-#verticalShapes {
- position:absolute;
- right: -56px;
- bottom: 15px;
- /*background-color: #fff;*/
-}
-
-.verticalshape {
- width: 50px;
- height: 50px;
- border: 2px solid #333;
- border-radius: 0px 5px 5px 0px;
- margin-top: 4px;
- /*background-color: #f0f;*/
- cursor: pointer;
-}
-
-.straight {
- background: url('../img/vertical_shape_icons/straight.png') no-repeat;
-}
-.diverging {
- background: url('../img/vertical_shape_icons/diverging.png') no-repeat;
-}
-.converging {
- background: url('../img/vertical_shape_icons/converging.png') no-repeat;
-}
-.sinus {
- background: url('../img/vertical_shape_icons/sinus.png') no-repeat;
-}
-
-
-/* Portrait */
-@media screen and (orientation:portrait) {
- body {
-/* background-color: #08F;*/
- }
-
- #landscape {
- display: none;
- }
- #portrait {
- display: block;
- }
-}
- /* Landscape */
-@media screen and (orientation:landscape) {
- body {
-/* background-color: #8F0;*/
- }
-
- #landscape {
- display: block;
- }
- #portrait {
- display: none;
- }
-}
-
-.uiButtonsContainer {
- position: fixed;
- top: 0px;
- left: 0px;
- width: 1024px;
- min-height: 500px;
- max-height: 768px;
- height: 100%;
- /* height: 768px;*/
-}
-.uiButtonsContainer:before {
- content:' ';
- display:block;
- position:absolute;
- left:0;
- top:0;
- right:0;
- bottom:0;
- border: 2px solid #333;
-}
-
-#d3dlogo {
- position: absolute;
- top: 15px;
- left: 31%;
- width: 399px;
- height: 139px;
- background-image: url('../img/logo_full.png');
- cursor: pointer;
-}
-
-#drawAreaContainer {
- position: absolute;
- top: 193px;
- left: 193px;
- width: 650px;
- height: 450px;
- background-color: #fff;
- border: 4px solid #000;
- border-radius: 15px;
-}
-
-#preview_tmp {
- position: absolute;
- top: 0px;
- left: 0px;
- z-index: 500;
- border: 1px solid #f80;
- display: none;
-}
-
-#mycanvas, #preview {
- /*border: 1px solid #08c;*/
- float: left;
-}
-
-#mycanvas {
- width: 500px;
- height: 450px;
- border: 0px solid #333;
- border-right: 2px solid #333;
-}
-
-#preview {
- /*border: 1px solid #f8c;*/
- position: absolute;
- right: 0px;
- top: 0px;
- width: 150px;
- height: 450px;
-}
-
-.vertImage {
- margin: 0px;
- padding: 0px;
- /*border: 2px solid #f0f;*/
- max-width: 100%;
- height: auto;
- width: auto; /* for ie9 */
-}
-
-
-.bgTop {
- position: absolute;
- top: 0px;
- left: 0px;
- z-index: -5;
-}
-.bgMiddle {
- display: block;
- position: absolute;
- top: 30%;
- left: 0px;
- z-index: -5;
-}
-.bgBottom {
- position: absolute;
- bottom: 0px;
- left: 0px;
- z-index: -5;
-}
-
-/* PRINT PROGRESS DISPLAY */
-#printProgressContainer {
- position: absolute;
- right: 30px;
- top: 370px;
- width: 110px;
- margin: 5px 0px;
- font-weight: bold;
- display:none;
-}
-#progressbarContainer {
- margin: 3px 0px;
- width: inherit;
- height: 20px;
- background-color: #fff;
- border: 2px solid #333;
- border-radius: 5px;
- -o-border-radius: 5px;
- -moz-border-radius: 5px;
- -webkit-border-radius: 5px;
-}
-.progressAmount {
- margin: 0px 5px;
-}
-#progressbar {
- position: relative;
- /*margin-bottom: -20px;*/
- width: 0%;
- height: 100%;
- background-color: #4c4;
- border: 0px solid #f0f;
- border-radius: 3px;
- -o-border-radius: 3px;
- -moz-border-radius: 3px;
- -webkit-border-radius: 3px;
-}
-
-/* THERMOMETER */
-#thermometerContainer {
- position: absolute;
- right: 5px;
- top: 360px;
-}
-#thermometerCanvas {
- /*background: #59b2b8;*/
- /*zoom: 2;*/
-}
-
-
-/* The code below is for resizing UI elements as the viewport becomes less high (suitable for tablets & smartphones) */
-
-@media screen and (max-height: 675px) {
- .bgMiddle {
- display: none;
- }
-
- #d3dlogo {
- width: 399px;
- height: 74px;
- background-image: url('../img/logo_small.png');
- margin-top: 9px;
- }
-
- #btnsUpDown, #btnsTurnLeftRight {
- zoom: 0.94;
- -moz-transform: translate(0px,-5px) scale(.94);
- }
-
- #btnNew {
- zoom: 0.94;
- -moz-transform: translate(-5px,-5px) scale(.94);
- /*-moz-transform: translate(-3px,-3px);*/
- }
- #btnOops {
- zoom: 0.94;
- -moz-transform: translate(-5px,-10px) scale(0.94);
- }
-
- #btnPrint {
- right: 10px;
- top: 10px;
- -moz-transform: translate(5px,-5px);
- }
-
-
- .btn {
- zoom: 0.94;
- -moz-transform: scale(.94);
- }
-
- #drawAreaContainer {
- top: 128px;
- height: 350px;
- }
-}
-
-@media screen and (max-height: 560px) {
- #d3dlogo {
- width: 399px;
- height: 57px;
- background-image: url('../img/logo_smaller_wide.png');
- margin-top: 14px;
- /*zoom: 0.8;*/
- /*-moz-transform: translate(-20px,-15px) scale(.8);*/
- /*-moz-transform: ;*/
- /*left: 34%;*/
- }
-
- #btnsUpDown, #btnsTurnLeftRight {
- zoom: 0.86;
- -moz-transform: translate(0px,-7px) scale(0.86);
- }
-
- #btnPrint {
- right: 6px;
- -moz-transform: translate(10px,-10px);
- }
-
- #btnNew {
- zoom: 0.86;
- -moz-transform: translate(-10px,-10px) scale(.86);
- }
-
- .btn {
- zoom: 0.86;
- -moz-transform: scale(.86);
- }
-
- #btnOops {
- top: 350px;
- zoom: 0.86;
- -moz-transform: translate(-10px,-25px) scale(.86);
- }
- #btnSave {
- -moz-transform: translate(-5px,-13px);
- }
-
- #btnPrevious, #btnNext {
- /*top: 200px;*/
- -moz-transform: translate(-5px,-10px);
- }
-
- #drawAreaContainer {
- top: 110px;
- height: 350px;
- }
-}
-
-
-
diff --git a/css_old/_backup20131011/fixedPosInterface.css.REMOTE.99789.css b/css_old/_backup20131011/fixedPosInterface.css.REMOTE.99789.css
deleted file mode 100644
index e69de29..0000000
diff --git a/css_old/_backup20131011/popups.css b/css_old/_backup20131011/popups.css
deleted file mode 100644
index ce17655..0000000
--- a/css_old/_backup20131011/popups.css
+++ /dev/null
@@ -1,74 +0,0 @@
-#contentOverlay {
- background-color: rgba(255, 255, 255, 0.65);
- z-index: 10;
- position: absolute;
- top: 0px;
- left: 0px;
- width: 1024px;
- height: 100%;
- display:none;
-}
-
-.popup {
- background-color: #fff;
- z-index: 15;
-
- position: absolute;
- top: 50%;
- left: 50%;
- width: 835px;
- height: 500px;
- margin: -250px 0 0 -417.5px;
- /*padding: 25px;*/
-
- /*overflow: scroll;*/
- /*overflow-y: hidden;*/
- -moz-box-shadow: 0px 2px 6px 0px rgba(16, 16, 16, 0.65);
- -webkit-box-shadow: 0px 2px 6px 0px rgba(16, 16, 16, 0.65);
- box-shadow: 0px 2px 6px 0px rgba(16, 16, 16, 0.65);
- border: 2px solid #222;
- border-radius: 15px;
- -moz-border-radius: 15px;
- -webkit-border-radius: 15px;
- overflow: hidden;
- display:none;
-}
-
-
-#settings header {
- margin: 25px 25px 0 25px;
- height: 44px;
-}
-#settings div.content {
- margin: 15px 25px 25px 25px;
- height: 388px;
- display: table;
-}
-#settings div.content > div {
- height: 100%;
-}
-#settings div.content > div.settings {
- border: 1px solid rgb(187, 187, 187);
- -webkit-border-radius: 5px;
- -moz-border-radius: 5px;
- border-radius: 5px;
-
- width: 660px;
- overflow: scroll;
- max-height: 368px;
- overflow-x: hidden;
- padding: 10px 10px 10px 10px;
-}
-#settings div.content > div.manipulationBtns {
- display: table-cell;
- vertical-align: bottom;
- width: 125px;
-
-}
-#settings div.content .btnOK {
- width: 85px;
- height: 86px;
- background: url('../img/buttons/btnOk_settings.png') no-repeat;
- margin: 0 0 0 10px;
- cursor: pointer;
-}
\ No newline at end of file
diff --git a/css_old/_settings.css b/css_old/_settings.css
deleted file mode 100644
index 7c6112c..0000000
--- a/css_old/_settings.css
+++ /dev/null
@@ -1,96 +0,0 @@
-form {
- margin: 10px;
-}
-form input {
- margin: 1px;
-}
-
-body,th,td {
- font-family: Helvetica, Arial, "Nimbus Sans L", sans-serif;
- font-size: 13px;
-}
-.settingsContainer {
- position:relative;
- max-width: 600px;
- /*min-width: 370px;*/
- width: 100%;
- height: 100%;
-}
-/*form#settingsForm {*/
- /*width: 100% auto;*/
-/*}*/
-form fieldset {
- max-width: 600px;
- border: 1px solid rgb(187, 187, 187);
- -webkit-border-radius: 5px;
- -moz-border-radius: 5px;
- border-radius: 5px;
- margin-bottom: 20px;
- padding: 8px;
- /*padding-right: 8px;*/
-}
-form fieldset fieldset{
- max-width: 580px;
- margin: 15px 0 5px 0;
- clear: left;
- float: left;
-}
-form fieldset legend {
- margin-left: 10px;
- font-weight: bold;
-}
-form label {
- min-width: 150px;
- display: block;
- float: left;
- margin: 1px 0 0 0;
- clear: left;
-}
-form div {
- float: left;
-}
-form input[type="text"], form input[type="number"], form input[type="password"] {
- border: 1px solid rgb(144, 192, 255);
- margin-right: 5px;
- -webkit-border-radius: 4px;
- -moz-border-radius: 4px;
- border-radius: 4px;
-}
-form input[type="text"].small, form input[type="number"].small, form input[type="password"].small {
- width: 50px;
-}
-form input[type="text"].large, form input[type="number"].large, form input[type="password"].large {
- width: 250px;
-}
-form input[type="radio"] {
- margin: 4px 4px 0 0;
-}
-
-form textarea {
- border: 1px solid rgb(144, 192, 255);
- -webkit-border-radius: 5px;
- -moz-border-radius: 5px;
- border-radius: 5px;
-}
-form .startgcode_left {
- float:left;
- margin-right: 20px;
-}
-form textarea.gcode {
- width: 252px;
- /*max-width: 262px;*/
- /*min-width: 200px;*/
- height: 150px;
-}
-form small {
- margin: 3px 0 0 0;
- display: block;
- clear: left;
-}
-form .button {
- display: inline-block;
-}
-
-form #passwordLabel, form #password {
- display: none;
-}
\ No newline at end of file
diff --git a/img_old/bg_vertical.jpg b/img_old/bg_vertical.jpg
deleted file mode 100755
index e71bc82..0000000
Binary files a/img_old/bg_vertical.jpg and /dev/null differ
diff --git a/img_old/icon.png b/img_old/icon.png
deleted file mode 100755
index 434f30f..0000000
Binary files a/img_old/icon.png and /dev/null differ
diff --git a/img_old/logo/logo_full.png b/img_old/logo/logo_full.png
deleted file mode 100755
index 47415d8..0000000
Binary files a/img_old/logo/logo_full.png and /dev/null differ
diff --git a/img_old/logo/logo_full_8bit.png b/img_old/logo/logo_full_8bit.png
deleted file mode 100644
index adba35c..0000000
Binary files a/img_old/logo/logo_full_8bit.png and /dev/null differ
diff --git a/img_old/logo/logo_small BACKUP.png b/img_old/logo/logo_small BACKUP.png
deleted file mode 100644
index 372b5ee..0000000
Binary files a/img_old/logo/logo_small BACKUP.png and /dev/null differ
diff --git a/img_old/logo/logo_small.png b/img_old/logo/logo_small.png
deleted file mode 100644
index 1ea8163..0000000
Binary files a/img_old/logo/logo_small.png and /dev/null differ
diff --git a/img_old/logo/logo_small_8bit.png b/img_old/logo/logo_small_8bit.png
deleted file mode 100644
index a2c0189..0000000
Binary files a/img_old/logo/logo_small_8bit.png and /dev/null differ
diff --git a/img_old/logo/logo_smaller.png b/img_old/logo/logo_smaller.png
deleted file mode 100644
index f000e5c..0000000
Binary files a/img_old/logo/logo_smaller.png and /dev/null differ
diff --git a/img_old/logo/logo_smaller_8bit.png b/img_old/logo/logo_smaller_8bit.png
deleted file mode 100644
index bd85479..0000000
Binary files a/img_old/logo/logo_smaller_8bit.png and /dev/null differ
diff --git a/img_old/logo/logo_smaller_wide.png b/img_old/logo/logo_smaller_wide.png
deleted file mode 100644
index 25ae4c8..0000000
Binary files a/img_old/logo/logo_smaller_wide.png and /dev/null differ
diff --git a/img_old/logo/logo_smaller_wide_8bit.png b/img_old/logo/logo_smaller_wide_8bit.png
deleted file mode 100644
index ef193ab..0000000
Binary files a/img_old/logo/logo_smaller_wide_8bit.png and /dev/null differ
diff --git a/img_old/logo/logo_smallest.png b/img_old/logo/logo_smallest.png
deleted file mode 100644
index 17f2799..0000000
Binary files a/img_old/logo/logo_smallest.png and /dev/null differ
diff --git a/img_old/logo/logo_smallest_wide.png b/img_old/logo/logo_smallest_wide.png
deleted file mode 100644
index c3f2fa1..0000000
Binary files a/img_old/logo/logo_smallest_wide.png and /dev/null differ
diff --git a/img_old/thermo_bg_2.png b/img_old/thermo_bg_2.png
deleted file mode 100644
index 8e3a979..0000000
Binary files a/img_old/thermo_bg_2.png and /dev/null differ
diff --git a/img_old/thermo_fg_2.png b/img_old/thermo_fg_2.png
deleted file mode 100644
index fc14ec4..0000000
Binary files a/img_old/thermo_fg_2.png and /dev/null differ
diff --git a/img_old/webpage_icons/apple-touch-icon-114x114-precomposed.png b/img_old/webpage_icons/apple-touch-icon-114x114-precomposed.png
deleted file mode 100644
index 50e1053..0000000
Binary files a/img_old/webpage_icons/apple-touch-icon-114x114-precomposed.png and /dev/null differ
diff --git a/img_old/webpage_icons/apple-touch-icon-144x144-precomposed.png b/img_old/webpage_icons/apple-touch-icon-144x144-precomposed.png
deleted file mode 100644
index 585036f..0000000
Binary files a/img_old/webpage_icons/apple-touch-icon-144x144-precomposed.png and /dev/null differ
diff --git a/img_old/webpage_icons/apple-touch-icon-72x72-precomposed.png b/img_old/webpage_icons/apple-touch-icon-72x72-precomposed.png
deleted file mode 100644
index f422615..0000000
Binary files a/img_old/webpage_icons/apple-touch-icon-72x72-precomposed.png and /dev/null differ
diff --git a/img_old/webpage_icons/apple-touch-icon-precomposed.png b/img_old/webpage_icons/apple-touch-icon-precomposed.png
deleted file mode 100644
index 333520f..0000000
Binary files a/img_old/webpage_icons/apple-touch-icon-precomposed.png and /dev/null differ
diff --git a/js_src/Button.js b/js/Button.js
similarity index 98%
rename from js_src/Button.js
rename to js/Button.js
index ea3a3ad..3afc06c 100644
--- a/js_src/Button.js
+++ b/js/Button.js
@@ -12,7 +12,7 @@
var _timer = undefined;
var _x,_y;
var isDown = false;
- var hoi = "fijn";
+ // var hoi = "fijn";
var updateCursor = function(e) {
// console.log(e.offsetX);
diff --git a/js_src/Class.js b/js/Class.js
similarity index 100%
rename from js_src/Class.js
rename to js/Class.js
diff --git a/js_src/Help.js b/js/Help.js
similarity index 100%
rename from js_src/Help.js
rename to js/Help.js
diff --git a/js_src/Keyboard.js b/js/Keyboard.js
similarity index 100%
rename from js_src/Keyboard.js
rename to js/Keyboard.js
diff --git a/js_src/Message.js b/js/Message.js
similarity index 100%
rename from js_src/Message.js
rename to js/Message.js
diff --git a/js_src/Popup.js b/js/Popup.js
similarity index 100%
rename from js_src/Popup.js
rename to js/Popup.js
diff --git a/js_src/Printer.js b/js/Printer.js
similarity index 100%
rename from js_src/Printer.js
rename to js/Printer.js
diff --git a/js_src/PrinterPanel.js b/js/PrinterPanel.js
similarity index 100%
rename from js_src/PrinterPanel.js
rename to js/PrinterPanel.js
diff --git a/js_src/Progressbar.js b/js/Progressbar.js
similarity index 100%
rename from js_src/Progressbar.js
rename to js/Progressbar.js
diff --git a/js_src/SettingsWindow.js b/js/SettingsWindow.js
similarity index 100%
rename from js_src/SettingsWindow.js
rename to js/SettingsWindow.js
diff --git a/js_src/Shape.js b/js/Shape.js
similarity index 100%
rename from js_src/Shape.js
rename to js/Shape.js
diff --git a/js_src/Svg.js b/js/Svg.js
similarity index 100%
rename from js_src/Svg.js
rename to js/Svg.js
diff --git a/js_src/Thermometer.js b/js/Thermometer.js
similarity index 100%
rename from js_src/Thermometer.js
rename to js/Thermometer.js
diff --git a/js_src/UpdatePanel.js b/js/UpdatePanel.js
similarity index 100%
rename from js_src/UpdatePanel.js
rename to js/UpdatePanel.js
diff --git a/js_src/WordArt.js b/js/WordArt.js
similarity index 79%
rename from js_src/WordArt.js
rename to js/WordArt.js
index f668678..72bf59c 100644
--- a/js_src/WordArt.js
+++ b/js/WordArt.js
@@ -80,22 +80,6 @@ function getPathFromChar(ch) {
return $("#svgfont path")[index].attributes["d"].nodeValue;
}
-// function translatePoints(points,x,y) {
-// for (var i=0; i55) previewDown(true);
+ function onBtnDown(e) {
+ previewDown(true);
}
- function onBtnTwist(e,cursor) {
- if (cursor.y<25) previewTwistRight(true);
- else if (cursor.y>55) previewTwistLeft(true);
+ function onBtnTwistLeft(e) {
+ previewTwistLeft(true);
+ }
+
+ function onBtnTwistRight(e) {
+ previewTwistRight(true);
}
function onBtnOops(e) {
diff --git a/js_src/canvasDrawing.js b/js/canvasDrawing.js
similarity index 100%
rename from js_src/canvasDrawing.js
rename to js/canvasDrawing.js
diff --git a/js_src/d3dServerInterfacing.js b/js/d3dServerInterfacing.js
similarity index 100%
rename from js_src/d3dServerInterfacing.js
rename to js/d3dServerInterfacing.js
diff --git a/js_src/gcodeGenerating.js b/js/gcodeGenerating.js
similarity index 100%
rename from js_src/gcodeGenerating.js
rename to js/gcodeGenerating.js
diff --git a/js_src/init_layout.js b/js/init_layout.js
similarity index 100%
rename from js_src/init_layout.js
rename to js/init_layout.js
diff --git a/js_src/libs/FileSaver.js b/js/libs/FileSaver.js
similarity index 100%
rename from js_src/libs/FileSaver.js
rename to js/libs/FileSaver.js
diff --git a/js_src/libs/jquery-1-9-1.js b/js/libs/jquery-1-9-1.js
similarity index 100%
rename from js_src/libs/jquery-1-9-1.js
rename to js/libs/jquery-1-9-1.js
diff --git a/js_src/libs/jquery-cookie.js b/js/libs/jquery-cookie.js
similarity index 100%
rename from js_src/libs/jquery-cookie.js
rename to js/libs/jquery-cookie.js
diff --git a/js_src/libs/jquery-coolfieldset.js b/js/libs/jquery-coolfieldset.js
similarity index 100%
rename from js_src/libs/jquery-coolfieldset.js
rename to js/libs/jquery-coolfieldset.js
diff --git a/js_src/libs/jquery-fastclick.js b/js/libs/jquery-fastclick.js
similarity index 100%
rename from js_src/libs/jquery-fastclick.js
rename to js/libs/jquery-fastclick.js
diff --git a/js_src/libs/jquery-joyride-2-1.js b/js/libs/jquery-joyride-2-1.js
similarity index 100%
rename from js_src/libs/jquery-joyride-2-1.js
rename to js/libs/jquery-joyride-2-1.js
diff --git a/js_src/main.js b/js/main.js
similarity index 100%
rename from js_src/main.js
rename to js/main.js
diff --git a/js_src/previewRendering.js b/js/previewRendering.js
similarity index 100%
rename from js_src/previewRendering.js
rename to js/previewRendering.js
diff --git a/js_src/sidebar.js b/js/sidebar.js
similarity index 100%
rename from js_src/sidebar.js
rename to js/sidebar.js
diff --git a/js_src/sketches.js b/js/sketches.js
similarity index 100%
rename from js_src/sketches.js
rename to js/sketches.js
diff --git a/js_src/utils.js b/js/utils.js
similarity index 100%
rename from js_src/utils.js
rename to js/utils.js
diff --git a/js_src/verticalShapes.js b/js/verticalShapes.js
similarity index 100%
rename from js_src/verticalShapes.js
rename to js/verticalShapes.js
diff --git a/js_old/Thermometer.js.orig b/js_old/Thermometer.js.orig
deleted file mode 100644
index 54a708e..0000000
--- a/js_old/Thermometer.js.orig
+++ /dev/null
@@ -1,136 +0,0 @@
-<<<<<<< HEAD
-=======
-var $displayThermometer = $("#thermometerContainer");
-
-
-//TODO 2013-09-18 allow displaying temperatures HIGHER than the targTemp (it's now being capped at targTemp).
->>>>>>> new_layouting_approach
-function Thermometer() {
- this.currentTemperature = 0; // default val
- this.targetTemperature = 180; // default val
-
- this.thermoOverlayImg = new Image();
- this.thermoOverlayImgSrc = "img/thermometer_fg_overlay.png"; // ../img/thermometer_fg_overlay.png
-
- this.thermoWidth= 40;
- this.thermoHeight = 100;
-
- this.$canvas;
- this.canvas;
- this.context;
- this.$container;
-
- this.isInitted = false;
-
- this.enabled = true;
-
- this.thermoColors = [
- [50, 200, 244], // 'cold'
- [244, 190, 10], // 'warming up'
- [244, 50, 50] // 'ready / hot'
- ];
-
- this.init = function(targCanvas, targCanvasContainer) {
- console.log("Thermometer.init()");
-
- this.$container = targCanvasContainer;
-
- this.$canvas = targCanvas;
- this.canvas = this.$canvas[0];
- this.context = this.canvas.getContext('2d');
-
-
- var self = this;
- this.thermoOverlayImg.onload = function() {
- console.log("canvasThermoOverlay img loaded");
- self.isInitted = true;
- self.update(self.currentTemperature, self.targetTemperature);
- };
- this.thermoOverlayImg.src = this.thermoOverlayImgSrc;
- }
-
- this.update = function(curr, targ) {
- // console.log("Thermometer.update(" + curr + "," + targ + ")");
-
- if (this.isInitted) {
- if(!this.enabled) return;
- if (curr == undefined) curr = 0;
- if (targ== undefined) targ = 180; // prevent divide by zero
-
- var progress = curr / targ;
-
- progress = Math.min(progress, 1.0);
- progress = Math.max(progress, 0);
-
- var h = this.thermoHeight; // 94 // px
- var paddingUnder = 15; // how far is beginpoint from bottom of thermometer
- var paddingAbove = 25; // how far is endpoint from top of thermometer
- var endPoint = h * .8;
- var p = Math.floor((h - paddingUnder - paddingAbove) * progress); // %
- // var tempHeight =
-
- var currColor = this.thermoColors[0];
- if (progress > 0.98) {
- currColor = this.thermoColors[2];
- } else if (progress > 0.25) {
- currColor = this.thermoColors[1];
- }
-
- // clear
- this.context.clearRect(0, 0, this.canvas.width, this.canvas.height);
- this.context.font = "10pt sans-serif";
-
- // draw the thermometer clipping path
- this.context.save();
- this.context.beginPath();
- this.context.arc(40, 80, 16, 0, 2 * Math.PI, false); // circle bottom of thermometer
- this.context.arc(40, 10, 4, 0, 2 * Math.PI, false); // circle at top of thermometer tube
- this.context.rect(36, 11, 8, 70); // thermometer tube
- this.context.fillStyle = '#fff';
- this.context.fill();
- this.context.clip();
-
- // draw rectangle which represents temperature
- // rect will be clipped by the thermometer outlines
- this.context.beginPath();
- this.context.rect(20, h - paddingUnder - p, 60, p + paddingUnder);
- //console.log(" currColor: " + currColor);
- //todo Math.floor??
- this.context.fillStyle = "rgb(" + currColor[0] + "," + currColor[1] + "," + currColor[2] + ")";
- this.context.fill();
- this.context.restore();
-
- // additional text labels
- this.context.save();
- this.context.beginPath();
- this.context.moveTo(32, paddingAbove);
- this.context.lineTo(52, paddingAbove);
- this.context.lineWidth = 2;
- this.context.strokeStyle = '#000';
- this.context.stroke();
- this.context.fillStyle = '#000';
- this.context.textAlign = "left";
- this.context.textBaseline = "middle";
- this.context.fillText(targ + "°", 55, paddingAbove);
- this.context.restore();
-
- // the thermometer outline png
- this.context.drawImage(this.thermoOverlayImg, 20, 0);
-
- // text
- this.context.fillStyle = '#000';
- this.context.textAlign="center";
- this.context.fillText(curr + "°", 40, h + paddingUnder);
- } else {
- console.log("Thermometer.setTemperature() -> thermometer not initialized!");
- }
- }
- this.show = function() {
- this.$container.show();
- this.enabled = true;
- }
- this.hide = function() {
- this.$container.hide();
- this.enabled = false;
- }
-}
diff --git a/js_old/init_layout backup20130918.js b/js_old/init_layout backup20130918.js
deleted file mode 100644
index a535412..0000000
--- a/js_old/init_layout backup20130918.js
+++ /dev/null
@@ -1,260 +0,0 @@
-var imgDims = [320, 320]; // width and height of image
-
-function doClientAndOrientationStuff() {
- console.log("f:doClientAndOrientationStuff()");
-
- $(".agentInfo").text("");
-
- /*
- if( /Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent) ) {
- if (window.orientation == -90 || window.orientation == 90) {
- // landscape
-// $('#Viewport').attr('content', 'width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=yes');
- } else {
- // portrait
- $('#Viewport').attr('content', 'width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=yes');
- }
- }
- return;
- //*/
-
- if( /Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent) ) {
- console.log("PHONE OR TABLET! --> window.orientation = " + window.orientation);
- if (window.orientation == -90 || window.orientation == 90) {
- console.log(" landscape");
- // landscape
-
- // var ww = ( $(window).width() < window.screen.width ) ? $(window).width() : window.screen.width; //get proper width
- var ww = 0; //get proper width
- if (window.innerWidth) {
- ww = window.innerWidth;
- // if (window.screen.availWidth) {
-// ww = window.screen.availWidth;
-
-// if( /iPhone|iPad|iPod/i.test(navigator.userAgent) ) {
-// ww = window.innerWidth;
-// }
- } else if($(window).width()) {
- ww = $(window).width();
- } else {
-
- }
-
- // ww = 480;
-
- var mw = imgDims[0]; // min width of site
- //*
- if( /iPhone|iPad|iPod/i.test(navigator.userAgent) ) {
- var mw = imgDims[1]; // in landscape: min-width is image width
- }
- //*/
- var ratio = ww / mw; //calculate ratio
- $('#Viewport').attr('content', 'initial-scale='+ratio+',maximum-scale='+ratio+',minimum-scale='+ratio+',user-scalable=no,width='+mw);
- if( ww < mw){ //smaller than minimum size
-// $(".colmask").css("background-color", "#ff0");
- // $('#Viewport').attr('content', 'initial-scale=' + ratio + ', maximum-scale=' + ratio + ', minimum-scale=' + ratio + ', user-scalable=yes, width=' + ww);
- // $('#Viewport').attr('content', 'initial-scale=1.0, maximum-scale=2, minimum-scale=1.0, user-scalable=yes, width=' + ww);
- }else{ //regular size
-// $(".colmask").css("background-color", "#0ff");
- // $('#Viewport').attr('content', 'initial-scale=1.0, maximum-scale=2, minimum-scale=1.0, user-scalable=yes, width=' + ww);
- }
-
- console.log(" ww: " + ww + ", mw: " + mw + ", ratio: " + ratio);
-
- $(".agentInfo").append("ww: " + ww + ", mw: " + mw + " ");
- $(".agentInfo").append("ratio: " + ratio + " ");
- $(".agentInfo").append(" ");
- } else {
- console.log(" portrait");
- // portrait
-// $('#Viewport').attr('content', 'initial-scale='+1+',maximum-scale='+1+',minimum-scale='+1+',user-scalable=no');
- $('#Viewport').attr('content', 'width=device-width,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0,user-scalable=no');
- }
-
- } else {
- // console.log("else");
- $(".colmask").css("background-color", "#f80");
-
- }
-
-
- $(".agentInfo").append("$(window).width(): " + $(window).width() + " ");
- $(".agentInfo").append("window.screen.width: " + window.screen.width+ " ");
- $(".agentInfo").append("window.screen.availWidth: " + window.screen.availWidth+ " ");
- $(".agentInfo").append(" ");
- $(".agentInfo").append("window.innerWidth: " + window.innerWidth + " ");
- $(".agentInfo").append("window.innerHeight: " + window.innerHeight + " ");
- $(".agentInfo").append(" ");
- $(".agentInfo").append("$(window).height(): " + $(window).height() + " ");
- $(".agentInfo").append("window.screen.height: " + window.screen.height+ " ");
- $(".agentInfo").append("window.screen.availHeight: " + window.screen.availHeight+ " ");
- $(".agentInfo").append(" ");
- $(".agentInfo").append("user agent: " + navigator.userAgent + " ");
-};
-
-function doOnOrientationChange() {
- console.log("doOnOrientationChange");
- doClientAndOrientationStuff();
-
- // switch(window.orientation) {
- // case -90:
- // case 90:
- // alert('landscape');
- // break;
- // default:
- // alert('portrait');
- // break;
- // }
-}
-
-var drawAreaContainerMinHeight = 300;
-var drawAreaContainerMaxHeight = 450;
-function doOnResize() {
- // console.log("doOnResize() >> " + new Date().getTime());
-// $(".container").css("height", window.innerHeight);
-
- // code from new layouting approach... //TODO give this a more logical spot
- $drawAreaContainer.css("marginTop", -parseInt($drawAreaContainer.css("height"))/2);
-
- canvas.width = $drawAreaContainer.width() - 150; // canvas.clientWidth;
- canvas.height = $drawAreaContainer.height(); // canvas.clientHeight;
- // canvas.width = canvas.clientWidth;
- // canvas.height = canvas.clientHeight;
-
- // $("#drawAreaContainer").attr("width", parseInt($("#drawAreaContainer").css("width"), 10));
- // $("#drawAreaContainer").attr("height", parseInt($("#drawAreaContainer").css("height"), 10));
- // canvas.width = parseInt($canvas.css("width"), 10);
- // canvas.height = parseInt($canvas.css("height"), 10);
-
- preview.width = 150;
- preview.height = $drawAreaContainer.height();
-// preview.width = parseInt($preview.css("width"), 10);
-// preview.height = parseInt($preview.css("height"), 10);
-
- canvasWidth = canvas.width;
- canvasHeight = canvas.height;
-
- redrawDoodle();
- redrawPreview();
-
- return;
-
-// doClientAndOrientationStuff() // <-- is this necessary in this method?
-
-// console.log("f:doOnResize() >> $('#canvascontainer').innerHeight: " + window.innerHeight);
- if (window.innerHeight < 768) {
-// $('#drawAreaContainer').innerHeight(window.innerHeight - $("#drawAreaContainer").offset().top - 70);
- var newVal = window.innerHeight - $("#drawAreaContainer").offset().top - 100; // what's the 70 ??
- newVal = Math.max(newVal, drawAreaContainerMinHeight);
- newVal = Math.min(newVal, drawAreaContainerMaxHeight);
-
- $('#drawAreaContainer').innerHeight(newVal);
-
- // canvas drawing area
- $canvas.css("height", newVal);
- canvas.height = newVal;
- canvasWidth = canvas.width;
- canvasHeight = canvas.height;
-
- // preview area
- $preview.css("height", newVal);
- preview.height = newVal;
- layerOffsetY = preview.height - 1.75 * layerCY;
- yStep = preview.height / 150;
-
- redrawDoodle();
- redrawPreview();
- }
-}
-
-function initLayouting() {
- console.log("f:initLayouting()");
-
- // first set the css width/height and actual width/height of the drawing area
-
-
-
-
-// $doodleCanvas = $("#mycanvas");
-// doodleCanvas = $("#mycanvas")[0];
-// doodleCanvasContext = doodleCanvas.getContext('2d');
-
- $drawAreaContainer = $("#drawAreaContainer");
- $drawAreaContainer.css("margin", 0);
- $drawAreaContainer.css("marginLeft", -parseInt($drawAreaContainer.css("width"))/2);
- $drawAreaContainer.css("marginTop", -parseInt($drawAreaContainer.css("height"))/2);
-
- canvas.width = $drawAreaContainer.width() - 150; // canvas.clientWidth;
- canvas.height = $drawAreaContainer.height(); // canvas.clientHeight;
-// canvas.width = canvas.clientWidth;
-// canvas.height = canvas.clientHeight;
-
- preview.width = 150;
- preview.height = $drawAreaContainer.height();
-
- // code from new layouting approach... //TODO give this a more logical spot
-// $("#drawAreaContainer").attr("width", parseInt($("#drawAreaContainer").css("width"), 10));
-// $("#drawAreaContainer").attr("height", parseInt($("#drawAreaContainer").css("height"), 10));
-// canvas.width = parseInt($canvas.css("width"), 10);
-// canvas.height = parseInt($canvas.css("height"), 10);
-// preview.width = parseInt($preview.css("width"), 10);
-// preview.height = parseInt($preview.css("height"), 10);
- canvasWidth = canvas.width;
- canvasHeight = canvas.height;
-
-// console.log("f:initLayouting() >> canvas height: " + canvas.height);
-
-
-
- // imgDims[0] = parseInt($(".container").css("width").match(/[0-9]+/).join(""));
- // imgDims[1] = parseInt($(".container").css("height").match(/[0-9]+/).join(""));
-
-// imgDims = [1024, 768];
-
- /*
- if( /Android|webOS|BlackBerry/i.test(navigator.userAgent) ) {
- imgDims[1] = parseInt($(".container").css("height").match(/[0-9]+/).join(""));
- } else if ( /iPhone|iPad|iPod/i.test(navigator.userAgent) ) {
- imgDims[1] = parseInt($(".container").css("width").match(/[0-9]+/).join(""));
- } else {
- imgDims[1] = parseInt($(".container").css("height").match(/[0-9]+/).join(""));
- }
- //*/
-
- // $(".container").css("height", window.innerHeight);
-
- // window.innerHeight
- console.log("window.innerHeight: " + window.innerHeight);
- console.log("window.innerWidth: " + window.innerWidth);
- console.log("$('#drawAreaContainer').innerHeight(): " + $("#drawAreaContainer").innerHeight());
- console.log("$('#drawAreaContainer').offset().top: " + $("#drawAreaContainer").offset().top);
-
-
- /* 2013-07-26 not doing this resizing stuff now, it's not working well yet
- if (window.innerHeight < 768) {
- $('#drawAreaContainer').innerHeight(window.innerHeight - $("#drawAreaContainer").offset().top - 70);
- }
- //*/
-
- // timeout because it SEEMS to be beneficial for initting the layout
- // 2013-09-18 seems beneficial since when?
- setTimeout(_startOrientationAndChangeEventListening, 1000);
-}
-
-function _startOrientationAndChangeEventListening() {
- // Initial execution if needed
-
- $(window).on('resize', doOnResize);
-
-// if (!window.addEventListener) {
-// window.attachEvent('orientationchange', doOnOrientationChange, false);
-// window.attachEvent('resize', doOnResize, false);
-// } else {
-// window.addEventListener('orientationchange', doOnOrientationChange, false);
-// window.addEventListener('resize', doOnResize, false);
-// }
-
- // is it necessary to call these? Aren't they called by the above eventhandlers?
-// doClientAndOrientationStuff();
- doOnResize();
-}
diff --git a/js_old/libs/bootstrap.js b/js_old/libs/bootstrap.js
deleted file mode 100644
index 643e71c..0000000
--- a/js_old/libs/bootstrap.js
+++ /dev/null
@@ -1,2280 +0,0 @@
-/* ===================================================
- * bootstrap-transition.js v2.3.2
- * http://twitter.github.com/bootstrap/javascript.html#transitions
- * ===================================================
- * Copyright 2012 Twitter, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ========================================================== */
-
-
-!function ($) {
-
- "use strict"; // jshint ;_;
-
-
- /* CSS TRANSITION SUPPORT (http://www.modernizr.com/)
- * ======================================================= */
-
- $(function () {
-
- $.support.transition = (function () {
-
- var transitionEnd = (function () {
-
- var el = document.createElement('bootstrap')
- , transEndEventNames = {
- 'WebkitTransition' : 'webkitTransitionEnd'
- , 'MozTransition' : 'transitionend'
- , 'OTransition' : 'oTransitionEnd otransitionend'
- , 'transition' : 'transitionend'
- }
- , name
-
- for (name in transEndEventNames){
- if (el.style[name] !== undefined) {
- return transEndEventNames[name]
- }
- }
-
- }())
-
- return transitionEnd && {
- end: transitionEnd
- }
-
- })()
-
- })
-
-}(window.jQuery);/* ==========================================================
- * bootstrap-alert.js v2.3.2
- * http://twitter.github.com/bootstrap/javascript.html#alerts
- * ==========================================================
- * Copyright 2012 Twitter, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ========================================================== */
-
-
-!function ($) {
-
- "use strict"; // jshint ;_;
-
-
- /* ALERT CLASS DEFINITION
- * ====================== */
-
- var dismiss = '[data-dismiss="alert"]'
- , Alert = function (el) {
- $(el).on('click', dismiss, this.close)
- }
-
- Alert.prototype.close = function (e) {
- var $this = $(this)
- , selector = $this.attr('data-target')
- , $parent
-
- if (!selector) {
- selector = $this.attr('href')
- selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
- }
-
- $parent = $(selector)
-
- e && e.preventDefault()
-
- $parent.length || ($parent = $this.hasClass('alert') ? $this : $this.parent())
-
- $parent.trigger(e = $.Event('close'))
-
- if (e.isDefaultPrevented()) return
-
- $parent.removeClass('in')
-
- function removeElement() {
- $parent
- .trigger('closed')
- .remove()
- }
-
- $.support.transition && $parent.hasClass('fade') ?
- $parent.on($.support.transition.end, removeElement) :
- removeElement()
- }
-
-
- /* ALERT PLUGIN DEFINITION
- * ======================= */
-
- var old = $.fn.alert
-
- $.fn.alert = function (option) {
- return this.each(function () {
- var $this = $(this)
- , data = $this.data('alert')
- if (!data) $this.data('alert', (data = new Alert(this)))
- if (typeof option == 'string') data[option].call($this)
- })
- }
-
- $.fn.alert.Constructor = Alert
-
-
- /* ALERT NO CONFLICT
- * ================= */
-
- $.fn.alert.noConflict = function () {
- $.fn.alert = old
- return this
- }
-
-
- /* ALERT DATA-API
- * ============== */
-
- $(document).on('click.alert.data-api', dismiss, Alert.prototype.close)
-
-}(window.jQuery);/* ============================================================
- * bootstrap-button.js v2.3.2
- * http://twitter.github.com/bootstrap/javascript.html#buttons
- * ============================================================
- * Copyright 2012 Twitter, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================================================ */
-
-
-!function ($) {
-
- "use strict"; // jshint ;_;
-
-
- /* BUTTON PUBLIC CLASS DEFINITION
- * ============================== */
-
- var Button = function (element, options) {
- this.$element = $(element)
- this.options = $.extend({}, $.fn.button.defaults, options)
- }
-
- Button.prototype.setState = function (state) {
- var d = 'disabled'
- , $el = this.$element
- , data = $el.data()
- , val = $el.is('input') ? 'val' : 'html'
-
- state = state + 'Text'
- data.resetText || $el.data('resetText', $el[val]())
-
- $el[val](data[state] || this.options[state])
-
- // push to event loop to allow forms to submit
- setTimeout(function () {
- state == 'loadingText' ?
- $el.addClass(d).attr(d, d) :
- $el.removeClass(d).removeAttr(d)
- }, 0)
- }
-
- Button.prototype.toggle = function () {
- var $parent = this.$element.closest('[data-toggle="buttons-radio"]')
-
- $parent && $parent
- .find('.active')
- .removeClass('active')
-
- this.$element.toggleClass('active')
- }
-
-
- /* BUTTON PLUGIN DEFINITION
- * ======================== */
-
- var old = $.fn.button
-
- $.fn.button = function (option) {
- return this.each(function () {
- var $this = $(this)
- , data = $this.data('button')
- , options = typeof option == 'object' && option
- if (!data) $this.data('button', (data = new Button(this, options)))
- if (option == 'toggle') data.toggle()
- else if (option) data.setState(option)
- })
- }
-
- $.fn.button.defaults = {
- loadingText: 'loading...'
- }
-
- $.fn.button.Constructor = Button
-
-
- /* BUTTON NO CONFLICT
- * ================== */
-
- $.fn.button.noConflict = function () {
- $.fn.button = old
- return this
- }
-
-
- /* BUTTON DATA-API
- * =============== */
-
- $(document).on('click.button.data-api', '[data-toggle^=button]', function (e) {
- var $btn = $(e.target)
- if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
- $btn.button('toggle')
- })
-
-}(window.jQuery);/* ==========================================================
- * bootstrap-carousel.js v2.3.2
- * http://twitter.github.com/bootstrap/javascript.html#carousel
- * ==========================================================
- * Copyright 2012 Twitter, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ========================================================== */
-
-
-!function ($) {
-
- "use strict"; // jshint ;_;
-
-
- /* CAROUSEL CLASS DEFINITION
- * ========================= */
-
- var Carousel = function (element, options) {
- this.$element = $(element)
- this.$indicators = this.$element.find('.carousel-indicators')
- this.options = options
- this.options.pause == 'hover' && this.$element
- .on('mouseenter', $.proxy(this.pause, this))
- .on('mouseleave', $.proxy(this.cycle, this))
- }
-
- Carousel.prototype = {
-
- cycle: function (e) {
- if (!e) this.paused = false
- if (this.interval) clearInterval(this.interval);
- this.options.interval
- && !this.paused
- && (this.interval = setInterval($.proxy(this.next, this), this.options.interval))
- return this
- }
-
- , getActiveIndex: function () {
- this.$active = this.$element.find('.item.active')
- this.$items = this.$active.parent().children()
- return this.$items.index(this.$active)
- }
-
- , to: function (pos) {
- var activeIndex = this.getActiveIndex()
- , that = this
-
- if (pos > (this.$items.length - 1) || pos < 0) return
-
- if (this.sliding) {
- return this.$element.one('slid', function () {
- that.to(pos)
- })
- }
-
- if (activeIndex == pos) {
- return this.pause().cycle()
- }
-
- return this.slide(pos > activeIndex ? 'next' : 'prev', $(this.$items[pos]))
- }
-
- , pause: function (e) {
- if (!e) this.paused = true
- if (this.$element.find('.next, .prev').length && $.support.transition.end) {
- this.$element.trigger($.support.transition.end)
- this.cycle(true)
- }
- clearInterval(this.interval)
- this.interval = null
- return this
- }
-
- , next: function () {
- if (this.sliding) return
- return this.slide('next')
- }
-
- , prev: function () {
- if (this.sliding) return
- return this.slide('prev')
- }
-
- , slide: function (type, next) {
- var $active = this.$element.find('.item.active')
- , $next = next || $active[type]()
- , isCycling = this.interval
- , direction = type == 'next' ? 'left' : 'right'
- , fallback = type == 'next' ? 'first' : 'last'
- , that = this
- , e
-
- this.sliding = true
-
- isCycling && this.pause()
-
- $next = $next.length ? $next : this.$element.find('.item')[fallback]()
-
- e = $.Event('slide', {
- relatedTarget: $next[0]
- , direction: direction
- })
-
- if ($next.hasClass('active')) return
-
- if (this.$indicators.length) {
- this.$indicators.find('.active').removeClass('active')
- this.$element.one('slid', function () {
- var $nextIndicator = $(that.$indicators.children()[that.getActiveIndex()])
- $nextIndicator && $nextIndicator.addClass('active')
- })
- }
-
- if ($.support.transition && this.$element.hasClass('slide')) {
- this.$element.trigger(e)
- if (e.isDefaultPrevented()) return
- $next.addClass(type)
- $next[0].offsetWidth // force reflow
- $active.addClass(direction)
- $next.addClass(direction)
- this.$element.one($.support.transition.end, function () {
- $next.removeClass([type, direction].join(' ')).addClass('active')
- $active.removeClass(['active', direction].join(' '))
- that.sliding = false
- setTimeout(function () { that.$element.trigger('slid') }, 0)
- })
- } else {
- this.$element.trigger(e)
- if (e.isDefaultPrevented()) return
- $active.removeClass('active')
- $next.addClass('active')
- this.sliding = false
- this.$element.trigger('slid')
- }
-
- isCycling && this.cycle()
-
- return this
- }
-
- }
-
-
- /* CAROUSEL PLUGIN DEFINITION
- * ========================== */
-
- var old = $.fn.carousel
-
- $.fn.carousel = function (option) {
- return this.each(function () {
- var $this = $(this)
- , data = $this.data('carousel')
- , options = $.extend({}, $.fn.carousel.defaults, typeof option == 'object' && option)
- , action = typeof option == 'string' ? option : options.slide
- if (!data) $this.data('carousel', (data = new Carousel(this, options)))
- if (typeof option == 'number') data.to(option)
- else if (action) data[action]()
- else if (options.interval) data.pause().cycle()
- })
- }
-
- $.fn.carousel.defaults = {
- interval: 5000
- , pause: 'hover'
- }
-
- $.fn.carousel.Constructor = Carousel
-
-
- /* CAROUSEL NO CONFLICT
- * ==================== */
-
- $.fn.carousel.noConflict = function () {
- $.fn.carousel = old
- return this
- }
-
- /* CAROUSEL DATA-API
- * ================= */
-
- $(document).on('click.carousel.data-api', '[data-slide], [data-slide-to]', function (e) {
- var $this = $(this), href
- , $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
- , options = $.extend({}, $target.data(), $this.data())
- , slideIndex
-
- $target.carousel(options)
-
- if (slideIndex = $this.attr('data-slide-to')) {
- $target.data('carousel').pause().to(slideIndex).cycle()
- }
-
- e.preventDefault()
- })
-
-}(window.jQuery);/* =============================================================
- * bootstrap-collapse.js v2.3.2
- * http://twitter.github.com/bootstrap/javascript.html#collapse
- * =============================================================
- * Copyright 2012 Twitter, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================================================ */
-
-
-!function ($) {
-
- "use strict"; // jshint ;_;
-
-
- /* COLLAPSE PUBLIC CLASS DEFINITION
- * ================================ */
-
- var Collapse = function (element, options) {
- this.$element = $(element)
- this.options = $.extend({}, $.fn.collapse.defaults, options)
-
- if (this.options.parent) {
- this.$parent = $(this.options.parent)
- }
-
- this.options.toggle && this.toggle()
- }
-
- Collapse.prototype = {
-
- constructor: Collapse
-
- , dimension: function () {
- var hasWidth = this.$element.hasClass('width')
- return hasWidth ? 'width' : 'height'
- }
-
- , show: function () {
- var dimension
- , scroll
- , actives
- , hasData
-
- if (this.transitioning || this.$element.hasClass('in')) return
-
- dimension = this.dimension()
- scroll = $.camelCase(['scroll', dimension].join('-'))
- actives = this.$parent && this.$parent.find('> .accordion-group > .in')
-
- if (actives && actives.length) {
- hasData = actives.data('collapse')
- if (hasData && hasData.transitioning) return
- actives.collapse('hide')
- hasData || actives.data('collapse', null)
- }
-
- this.$element[dimension](0)
- this.transition('addClass', $.Event('show'), 'shown')
- $.support.transition && this.$element[dimension](this.$element[0][scroll])
- }
-
- , hide: function () {
- var dimension
- if (this.transitioning || !this.$element.hasClass('in')) return
- dimension = this.dimension()
- this.reset(this.$element[dimension]())
- this.transition('removeClass', $.Event('hide'), 'hidden')
- this.$element[dimension](0)
- }
-
- , reset: function (size) {
- var dimension = this.dimension()
-
- this.$element
- .removeClass('collapse')
- [dimension](size || 'auto')
- [0].offsetWidth
-
- this.$element[size !== null ? 'addClass' : 'removeClass']('collapse')
-
- return this
- }
-
- , transition: function (method, startEvent, completeEvent) {
- var that = this
- , complete = function () {
- if (startEvent.type == 'show') that.reset()
- that.transitioning = 0
- that.$element.trigger(completeEvent)
- }
-
- this.$element.trigger(startEvent)
-
- if (startEvent.isDefaultPrevented()) return
-
- this.transitioning = 1
-
- this.$element[method]('in')
-
- $.support.transition && this.$element.hasClass('collapse') ?
- this.$element.one($.support.transition.end, complete) :
- complete()
- }
-
- , toggle: function () {
- this[this.$element.hasClass('in') ? 'hide' : 'show']()
- }
-
- }
-
-
- /* COLLAPSE PLUGIN DEFINITION
- * ========================== */
-
- var old = $.fn.collapse
-
- $.fn.collapse = function (option) {
- return this.each(function () {
- var $this = $(this)
- , data = $this.data('collapse')
- , options = $.extend({}, $.fn.collapse.defaults, $this.data(), typeof option == 'object' && option)
- if (!data) $this.data('collapse', (data = new Collapse(this, options)))
- if (typeof option == 'string') data[option]()
- })
- }
-
- $.fn.collapse.defaults = {
- toggle: true
- }
-
- $.fn.collapse.Constructor = Collapse
-
-
- /* COLLAPSE NO CONFLICT
- * ==================== */
-
- $.fn.collapse.noConflict = function () {
- $.fn.collapse = old
- return this
- }
-
-
- /* COLLAPSE DATA-API
- * ================= */
-
- $(document).on('click.collapse.data-api', '[data-toggle=collapse]', function (e) {
- var $this = $(this), href
- , target = $this.attr('data-target')
- || e.preventDefault()
- || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7
- , option = $(target).data('collapse') ? 'toggle' : $this.data()
- $this[$(target).hasClass('in') ? 'addClass' : 'removeClass']('collapsed')
- $(target).collapse(option)
- })
-
-}(window.jQuery);/* ============================================================
- * bootstrap-dropdown.js v2.3.2
- * http://twitter.github.com/bootstrap/javascript.html#dropdowns
- * ============================================================
- * Copyright 2012 Twitter, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================================================ */
-
-
-!function ($) {
-
- "use strict"; // jshint ;_;
-
-
- /* DROPDOWN CLASS DEFINITION
- * ========================= */
-
- var toggle = '[data-toggle=dropdown]'
- , Dropdown = function (element) {
- var $el = $(element).on('click.dropdown.data-api', this.toggle)
- $('html').on('click.dropdown.data-api', function () {
- $el.parent().removeClass('open')
- })
- }
-
- Dropdown.prototype = {
-
- constructor: Dropdown
-
- , toggle: function (e) {
- var $this = $(this)
- , $parent
- , isActive
-
- if ($this.is('.disabled, :disabled')) return
-
- $parent = getParent($this)
-
- isActive = $parent.hasClass('open')
-
- clearMenus()
-
- if (!isActive) {
- if ('ontouchstart' in document.documentElement) {
- // if mobile we we use a backdrop because click events don't delegate
- $('
').insertBefore($(this)).on('click', clearMenus)
- }
- $parent.toggleClass('open')
- }
-
- $this.focus()
-
- return false
- }
-
- , keydown: function (e) {
- var $this
- , $items
- , $active
- , $parent
- , isActive
- , index
-
- if (!/(38|40|27)/.test(e.keyCode)) return
-
- $this = $(this)
-
- e.preventDefault()
- e.stopPropagation()
-
- if ($this.is('.disabled, :disabled')) return
-
- $parent = getParent($this)
-
- isActive = $parent.hasClass('open')
-
- if (!isActive || (isActive && e.keyCode == 27)) {
- if (e.which == 27) $parent.find(toggle).focus()
- return $this.click()
- }
-
- $items = $('[role=menu] li:not(.divider):visible a', $parent)
-
- if (!$items.length) return
-
- index = $items.index($items.filter(':focus'))
-
- if (e.keyCode == 38 && index > 0) index-- // up
- if (e.keyCode == 40 && index < $items.length - 1) index++ // down
- if (!~index) index = 0
-
- $items
- .eq(index)
- .focus()
- }
-
- }
-
- function clearMenus() {
- $('.dropdown-backdrop').remove()
- $(toggle).each(function () {
- getParent($(this)).removeClass('open')
- })
- }
-
- function getParent($this) {
- var selector = $this.attr('data-target')
- , $parent
-
- if (!selector) {
- selector = $this.attr('href')
- selector = selector && /#/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
- }
-
- $parent = selector && $(selector)
-
- if (!$parent || !$parent.length) $parent = $this.parent()
-
- return $parent
- }
-
-
- /* DROPDOWN PLUGIN DEFINITION
- * ========================== */
-
- var old = $.fn.dropdown
-
- $.fn.dropdown = function (option) {
- return this.each(function () {
- var $this = $(this)
- , data = $this.data('dropdown')
- if (!data) $this.data('dropdown', (data = new Dropdown(this)))
- if (typeof option == 'string') data[option].call($this)
- })
- }
-
- $.fn.dropdown.Constructor = Dropdown
-
-
- /* DROPDOWN NO CONFLICT
- * ==================== */
-
- $.fn.dropdown.noConflict = function () {
- $.fn.dropdown = old
- return this
- }
-
-
- /* APPLY TO STANDARD DROPDOWN ELEMENTS
- * =================================== */
-
- $(document)
- .on('click.dropdown.data-api', clearMenus)
- .on('click.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
- .on('click.dropdown.data-api' , toggle, Dropdown.prototype.toggle)
- .on('keydown.dropdown.data-api', toggle + ', [role=menu]' , Dropdown.prototype.keydown)
-
-}(window.jQuery);
-/* =========================================================
- * bootstrap-modal.js v2.3.2
- * http://twitter.github.com/bootstrap/javascript.html#modals
- * =========================================================
- * Copyright 2012 Twitter, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ========================================================= */
-
-
-!function ($) {
-
- "use strict"; // jshint ;_;
-
-
- /* MODAL CLASS DEFINITION
- * ====================== */
-
- var Modal = function (element, options) {
- this.options = options
- this.$element = $(element)
- .delegate('[data-dismiss="modal"]', 'click.dismiss.modal', $.proxy(this.hide, this))
- this.options.remote && this.$element.find('.modal-body').load(this.options.remote)
- }
-
- Modal.prototype = {
-
- constructor: Modal
-
- , toggle: function () {
- return this[!this.isShown ? 'show' : 'hide']()
- }
-
- , show: function () {
- var that = this
- , e = $.Event('show')
-
- this.$element.trigger(e)
-
- if (this.isShown || e.isDefaultPrevented()) return
-
- this.isShown = true
-
- this.escape()
-
- this.backdrop(function () {
- var transition = $.support.transition && that.$element.hasClass('fade')
-
- if (!that.$element.parent().length) {
- that.$element.appendTo(document.body) //don't move modals dom position
- }
-
- that.$element.show()
-
- if (transition) {
- that.$element[0].offsetWidth // force reflow
- }
-
- that.$element
- .addClass('in')
- .attr('aria-hidden', false)
-
- that.enforceFocus()
-
- transition ?
- that.$element.one($.support.transition.end, function () { that.$element.focus().trigger('shown') }) :
- that.$element.focus().trigger('shown')
-
- })
- }
-
- , hide: function (e) {
- e && e.preventDefault()
-
- var that = this
-
- e = $.Event('hide')
-
- this.$element.trigger(e)
-
- if (!this.isShown || e.isDefaultPrevented()) return
-
- this.isShown = false
-
- this.escape()
-
- $(document).off('focusin.modal')
-
- this.$element
- .removeClass('in')
- .attr('aria-hidden', true)
-
- $.support.transition && this.$element.hasClass('fade') ?
- this.hideWithTransition() :
- this.hideModal()
- }
-
- , enforceFocus: function () {
- var that = this
- $(document).on('focusin.modal', function (e) {
- if (that.$element[0] !== e.target && !that.$element.has(e.target).length) {
- that.$element.focus()
- }
- })
- }
-
- , escape: function () {
- var that = this
- if (this.isShown && this.options.keyboard) {
- this.$element.on('keyup.dismiss.modal', function ( e ) {
- e.which == 27 && that.hide()
- })
- } else if (!this.isShown) {
- this.$element.off('keyup.dismiss.modal')
- }
- }
-
- , hideWithTransition: function () {
- var that = this
- , timeout = setTimeout(function () {
- that.$element.off($.support.transition.end)
- that.hideModal()
- }, 500)
-
- this.$element.one($.support.transition.end, function () {
- clearTimeout(timeout)
- that.hideModal()
- })
- }
-
- , hideModal: function () {
- var that = this
- this.$element.hide()
- this.backdrop(function () {
- that.removeBackdrop()
- that.$element.trigger('hidden')
- })
- }
-
- , removeBackdrop: function () {
- this.$backdrop && this.$backdrop.remove()
- this.$backdrop = null
- }
-
- , backdrop: function (callback) {
- var that = this
- , animate = this.$element.hasClass('fade') ? 'fade' : ''
-
- if (this.isShown && this.options.backdrop) {
- var doAnimate = $.support.transition && animate
-
- this.$backdrop = $('
')
- .appendTo(document.body)
-
- this.$backdrop.click(
- this.options.backdrop == 'static' ?
- $.proxy(this.$element[0].focus, this.$element[0])
- : $.proxy(this.hide, this)
- )
-
- if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
-
- this.$backdrop.addClass('in')
-
- if (!callback) return
-
- doAnimate ?
- this.$backdrop.one($.support.transition.end, callback) :
- callback()
-
- } else if (!this.isShown && this.$backdrop) {
- this.$backdrop.removeClass('in')
-
- $.support.transition && this.$element.hasClass('fade')?
- this.$backdrop.one($.support.transition.end, callback) :
- callback()
-
- } else if (callback) {
- callback()
- }
- }
- }
-
-
- /* MODAL PLUGIN DEFINITION
- * ======================= */
-
- var old = $.fn.modal
-
- $.fn.modal = function (option) {
- return this.each(function () {
- var $this = $(this)
- , data = $this.data('modal')
- , options = $.extend({}, $.fn.modal.defaults, $this.data(), typeof option == 'object' && option)
- if (!data) $this.data('modal', (data = new Modal(this, options)))
- if (typeof option == 'string') data[option]()
- else if (options.show) data.show()
- })
- }
-
- $.fn.modal.defaults = {
- backdrop: true
- , keyboard: true
- , show: true
- }
-
- $.fn.modal.Constructor = Modal
-
-
- /* MODAL NO CONFLICT
- * ================= */
-
- $.fn.modal.noConflict = function () {
- $.fn.modal = old
- return this
- }
-
-
- /* MODAL DATA-API
- * ============== */
-
- $(document).on('click.modal.data-api', '[data-toggle="modal"]', function (e) {
- var $this = $(this)
- , href = $this.attr('href')
- , $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) //strip for ie7
- , option = $target.data('modal') ? 'toggle' : $.extend({ remote:!/#/.test(href) && href }, $target.data(), $this.data())
-
- e.preventDefault()
-
- $target
- .modal(option)
- .one('hide', function () {
- $this.focus()
- })
- })
-
-}(window.jQuery);
-/* ===========================================================
- * bootstrap-tooltip.js v2.3.2
- * http://twitter.github.com/bootstrap/javascript.html#tooltips
- * Inspired by the original jQuery.tipsy by Jason Frame
- * ===========================================================
- * Copyright 2012 Twitter, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ========================================================== */
-
-
-!function ($) {
-
- "use strict"; // jshint ;_;
-
-
- /* TOOLTIP PUBLIC CLASS DEFINITION
- * =============================== */
-
- var Tooltip = function (element, options) {
- this.init('tooltip', element, options)
- }
-
- Tooltip.prototype = {
-
- constructor: Tooltip
-
- , init: function (type, element, options) {
- var eventIn
- , eventOut
- , triggers
- , trigger
- , i
-
- this.type = type
- this.$element = $(element)
- this.options = this.getOptions(options)
- this.enabled = true
-
- triggers = this.options.trigger.split(' ')
-
- for (i = triggers.length; i--;) {
- trigger = triggers[i]
- if (trigger == 'click') {
- this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))
- } else if (trigger != 'manual') {
- eventIn = trigger == 'hover' ? 'mouseenter' : 'focus'
- eventOut = trigger == 'hover' ? 'mouseleave' : 'blur'
- this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this))
- this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))
- }
- }
-
- this.options.selector ?
- (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) :
- this.fixTitle()
- }
-
- , getOptions: function (options) {
- options = $.extend({}, $.fn[this.type].defaults, this.$element.data(), options)
-
- if (options.delay && typeof options.delay == 'number') {
- options.delay = {
- show: options.delay
- , hide: options.delay
- }
- }
-
- return options
- }
-
- , enter: function (e) {
- var defaults = $.fn[this.type].defaults
- , options = {}
- , self
-
- this._options && $.each(this._options, function (key, value) {
- if (defaults[key] != value) options[key] = value
- }, this)
-
- self = $(e.currentTarget)[this.type](options).data(this.type)
-
- if (!self.options.delay || !self.options.delay.show) return self.show()
-
- clearTimeout(this.timeout)
- self.hoverState = 'in'
- this.timeout = setTimeout(function() {
- if (self.hoverState == 'in') self.show()
- }, self.options.delay.show)
- }
-
- , leave: function (e) {
- var self = $(e.currentTarget)[this.type](this._options).data(this.type)
-
- if (this.timeout) clearTimeout(this.timeout)
- if (!self.options.delay || !self.options.delay.hide) return self.hide()
-
- self.hoverState = 'out'
- this.timeout = setTimeout(function() {
- if (self.hoverState == 'out') self.hide()
- }, self.options.delay.hide)
- }
-
- , show: function () {
- var $tip
- , pos
- , actualWidth
- , actualHeight
- , placement
- , tp
- , e = $.Event('show')
-
- if (this.hasContent() && this.enabled) {
- this.$element.trigger(e)
- if (e.isDefaultPrevented()) return
- $tip = this.tip()
- this.setContent()
-
- if (this.options.animation) {
- $tip.addClass('fade')
- }
-
- placement = typeof this.options.placement == 'function' ?
- this.options.placement.call(this, $tip[0], this.$element[0]) :
- this.options.placement
-
- $tip
- .detach()
- .css({ top: 0, left: 0, display: 'block' })
-
- this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element)
-
- pos = this.getPosition()
-
- actualWidth = $tip[0].offsetWidth
- actualHeight = $tip[0].offsetHeight
-
- switch (placement) {
- case 'bottom':
- tp = {top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2}
- break
- case 'top':
- tp = {top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2}
- break
- case 'left':
- tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth}
- break
- case 'right':
- tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width}
- break
- }
-
- this.applyPlacement(tp, placement)
- this.$element.trigger('shown')
- }
- }
-
- , applyPlacement: function(offset, placement){
- var $tip = this.tip()
- , width = $tip[0].offsetWidth
- , height = $tip[0].offsetHeight
- , actualWidth
- , actualHeight
- , delta
- , replace
-
- $tip
- .offset(offset)
- .addClass(placement)
- .addClass('in')
-
- actualWidth = $tip[0].offsetWidth
- actualHeight = $tip[0].offsetHeight
-
- if (placement == 'top' && actualHeight != height) {
- offset.top = offset.top + height - actualHeight
- replace = true
- }
-
- if (placement == 'bottom' || placement == 'top') {
- delta = 0
-
- if (offset.left < 0){
- delta = offset.left * -2
- offset.left = 0
- $tip.offset(offset)
- actualWidth = $tip[0].offsetWidth
- actualHeight = $tip[0].offsetHeight
- }
-
- this.replaceArrow(delta - width + actualWidth, actualWidth, 'left')
- } else {
- this.replaceArrow(actualHeight - height, actualHeight, 'top')
- }
-
- if (replace) $tip.offset(offset)
- }
-
- , replaceArrow: function(delta, dimension, position){
- this
- .arrow()
- .css(position, delta ? (50 * (1 - delta / dimension) + "%") : '')
- }
-
- , setContent: function () {
- var $tip = this.tip()
- , title = this.getTitle()
-
- $tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title)
- $tip.removeClass('fade in top bottom left right')
- }
-
- , hide: function () {
- var that = this
- , $tip = this.tip()
- , e = $.Event('hide')
-
- this.$element.trigger(e)
- if (e.isDefaultPrevented()) return
-
- $tip.removeClass('in')
-
- function removeWithAnimation() {
- var timeout = setTimeout(function () {
- $tip.off($.support.transition.end).detach()
- }, 500)
-
- $tip.one($.support.transition.end, function () {
- clearTimeout(timeout)
- $tip.detach()
- })
- }
-
- $.support.transition && this.$tip.hasClass('fade') ?
- removeWithAnimation() :
- $tip.detach()
-
- this.$element.trigger('hidden')
-
- return this
- }
-
- , fixTitle: function () {
- var $e = this.$element
- if ($e.attr('title') || typeof($e.attr('data-original-title')) != 'string') {
- $e.attr('data-original-title', $e.attr('title') || '').attr('title', '')
- }
- }
-
- , hasContent: function () {
- return this.getTitle()
- }
-
- , getPosition: function () {
- var el = this.$element[0]
- return $.extend({}, (typeof el.getBoundingClientRect == 'function') ? el.getBoundingClientRect() : {
- width: el.offsetWidth
- , height: el.offsetHeight
- }, this.$element.offset())
- }
-
- , getTitle: function () {
- var title
- , $e = this.$element
- , o = this.options
-
- title = $e.attr('data-original-title')
- || (typeof o.title == 'function' ? o.title.call($e[0]) : o.title)
-
- return title
- }
-
- , tip: function () {
- return this.$tip = this.$tip || $(this.options.template)
- }
-
- , arrow: function(){
- return this.$arrow = this.$arrow || this.tip().find(".tooltip-arrow")
- }
-
- , validate: function () {
- if (!this.$element[0].parentNode) {
- this.hide()
- this.$element = null
- this.options = null
- }
- }
-
- , enable: function () {
- this.enabled = true
- }
-
- , disable: function () {
- this.enabled = false
- }
-
- , toggleEnabled: function () {
- this.enabled = !this.enabled
- }
-
- , toggle: function (e) {
- var self = e ? $(e.currentTarget)[this.type](this._options).data(this.type) : this
- self.tip().hasClass('in') ? self.hide() : self.show()
- }
-
- , destroy: function () {
- this.hide().$element.off('.' + this.type).removeData(this.type)
- }
-
- }
-
-
- /* TOOLTIP PLUGIN DEFINITION
- * ========================= */
-
- var old = $.fn.tooltip
-
- $.fn.tooltip = function ( option ) {
- return this.each(function () {
- var $this = $(this)
- , data = $this.data('tooltip')
- , options = typeof option == 'object' && option
- if (!data) $this.data('tooltip', (data = new Tooltip(this, options)))
- if (typeof option == 'string') data[option]()
- })
- }
-
- $.fn.tooltip.Constructor = Tooltip
-
- $.fn.tooltip.defaults = {
- animation: true
- , placement: 'top'
- , selector: false
- , template: ''
- , trigger: 'hover focus'
- , title: ''
- , delay: 0
- , html: false
- , container: false
- }
-
-
- /* TOOLTIP NO CONFLICT
- * =================== */
-
- $.fn.tooltip.noConflict = function () {
- $.fn.tooltip = old
- return this
- }
-
-}(window.jQuery);
-/* ===========================================================
- * bootstrap-popover.js v2.3.2
- * http://twitter.github.com/bootstrap/javascript.html#popovers
- * ===========================================================
- * Copyright 2012 Twitter, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * =========================================================== */
-
-
-!function ($) {
-
- "use strict"; // jshint ;_;
-
-
- /* POPOVER PUBLIC CLASS DEFINITION
- * =============================== */
-
- var Popover = function (element, options) {
- this.init('popover', element, options)
- }
-
-
- /* NOTE: POPOVER EXTENDS BOOTSTRAP-TOOLTIP.js
- ========================================== */
-
- Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype, {
-
- constructor: Popover
-
- , setContent: function () {
- var $tip = this.tip()
- , title = this.getTitle()
- , content = this.getContent()
-
- $tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title)
- $tip.find('.popover-content')[this.options.html ? 'html' : 'text'](content)
-
- $tip.removeClass('fade top bottom left right in')
- }
-
- , hasContent: function () {
- return this.getTitle() || this.getContent()
- }
-
- , getContent: function () {
- var content
- , $e = this.$element
- , o = this.options
-
- content = (typeof o.content == 'function' ? o.content.call($e[0]) : o.content)
- || $e.attr('data-content')
-
- return content
- }
-
- , tip: function () {
- if (!this.$tip) {
- this.$tip = $(this.options.template)
- }
- return this.$tip
- }
-
- , destroy: function () {
- this.hide().$element.off('.' + this.type).removeData(this.type)
- }
-
- })
-
-
- /* POPOVER PLUGIN DEFINITION
- * ======================= */
-
- var old = $.fn.popover
-
- $.fn.popover = function (option) {
- return this.each(function () {
- var $this = $(this)
- , data = $this.data('popover')
- , options = typeof option == 'object' && option
- if (!data) $this.data('popover', (data = new Popover(this, options)))
- if (typeof option == 'string') data[option]()
- })
- }
-
- $.fn.popover.Constructor = Popover
-
- $.fn.popover.defaults = $.extend({} , $.fn.tooltip.defaults, {
- placement: 'right'
- , trigger: 'click'
- , content: ''
- , template: ''
- })
-
-
- /* POPOVER NO CONFLICT
- * =================== */
-
- $.fn.popover.noConflict = function () {
- $.fn.popover = old
- return this
- }
-
-}(window.jQuery);
-/* =============================================================
- * bootstrap-scrollspy.js v2.3.2
- * http://twitter.github.com/bootstrap/javascript.html#scrollspy
- * =============================================================
- * Copyright 2012 Twitter, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================================================== */
-
-
-!function ($) {
-
- "use strict"; // jshint ;_;
-
-
- /* SCROLLSPY CLASS DEFINITION
- * ========================== */
-
- function ScrollSpy(element, options) {
- var process = $.proxy(this.process, this)
- , $element = $(element).is('body') ? $(window) : $(element)
- , href
- this.options = $.extend({}, $.fn.scrollspy.defaults, options)
- this.$scrollElement = $element.on('scroll.scroll-spy.data-api', process)
- this.selector = (this.options.target
- || ((href = $(element).attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
- || '') + ' .nav li > a'
- this.$body = $('body')
- this.refresh()
- this.process()
- }
-
- ScrollSpy.prototype = {
-
- constructor: ScrollSpy
-
- , refresh: function () {
- var self = this
- , $targets
-
- this.offsets = $([])
- this.targets = $([])
-
- $targets = this.$body
- .find(this.selector)
- .map(function () {
- var $el = $(this)
- , href = $el.data('target') || $el.attr('href')
- , $href = /^#\w/.test(href) && $(href)
- return ( $href
- && $href.length
- && [[ $href.position().top + (!$.isWindow(self.$scrollElement.get(0)) && self.$scrollElement.scrollTop()), href ]] ) || null
- })
- .sort(function (a, b) { return a[0] - b[0] })
- .each(function () {
- self.offsets.push(this[0])
- self.targets.push(this[1])
- })
- }
-
- , process: function () {
- var scrollTop = this.$scrollElement.scrollTop() + this.options.offset
- , scrollHeight = this.$scrollElement[0].scrollHeight || this.$body[0].scrollHeight
- , maxScroll = scrollHeight - this.$scrollElement.height()
- , offsets = this.offsets
- , targets = this.targets
- , activeTarget = this.activeTarget
- , i
-
- if (scrollTop >= maxScroll) {
- return activeTarget != (i = targets.last()[0])
- && this.activate ( i )
- }
-
- for (i = offsets.length; i--;) {
- activeTarget != targets[i]
- && scrollTop >= offsets[i]
- && (!offsets[i + 1] || scrollTop <= offsets[i + 1])
- && this.activate( targets[i] )
- }
- }
-
- , activate: function (target) {
- var active
- , selector
-
- this.activeTarget = target
-
- $(this.selector)
- .parent('.active')
- .removeClass('active')
-
- selector = this.selector
- + '[data-target="' + target + '"],'
- + this.selector + '[href="' + target + '"]'
-
- active = $(selector)
- .parent('li')
- .addClass('active')
-
- if (active.parent('.dropdown-menu').length) {
- active = active.closest('li.dropdown').addClass('active')
- }
-
- active.trigger('activate')
- }
-
- }
-
-
- /* SCROLLSPY PLUGIN DEFINITION
- * =========================== */
-
- var old = $.fn.scrollspy
-
- $.fn.scrollspy = function (option) {
- return this.each(function () {
- var $this = $(this)
- , data = $this.data('scrollspy')
- , options = typeof option == 'object' && option
- if (!data) $this.data('scrollspy', (data = new ScrollSpy(this, options)))
- if (typeof option == 'string') data[option]()
- })
- }
-
- $.fn.scrollspy.Constructor = ScrollSpy
-
- $.fn.scrollspy.defaults = {
- offset: 10
- }
-
-
- /* SCROLLSPY NO CONFLICT
- * ===================== */
-
- $.fn.scrollspy.noConflict = function () {
- $.fn.scrollspy = old
- return this
- }
-
-
- /* SCROLLSPY DATA-API
- * ================== */
-
- $(window).on('load', function () {
- $('[data-spy="scroll"]').each(function () {
- var $spy = $(this)
- $spy.scrollspy($spy.data())
- })
- })
-
-}(window.jQuery);/* ========================================================
- * bootstrap-tab.js v2.3.2
- * http://twitter.github.com/bootstrap/javascript.html#tabs
- * ========================================================
- * Copyright 2012 Twitter, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ======================================================== */
-
-
-!function ($) {
-
- "use strict"; // jshint ;_;
-
-
- /* TAB CLASS DEFINITION
- * ==================== */
-
- var Tab = function (element) {
- this.element = $(element)
- }
-
- Tab.prototype = {
-
- constructor: Tab
-
- , show: function () {
- var $this = this.element
- , $ul = $this.closest('ul:not(.dropdown-menu)')
- , selector = $this.attr('data-target')
- , previous
- , $target
- , e
-
- if (!selector) {
- selector = $this.attr('href')
- selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
- }
-
- if ( $this.parent('li').hasClass('active') ) return
-
- previous = $ul.find('.active:last a')[0]
-
- e = $.Event('show', {
- relatedTarget: previous
- })
-
- $this.trigger(e)
-
- if (e.isDefaultPrevented()) return
-
- $target = $(selector)
-
- this.activate($this.parent('li'), $ul)
- this.activate($target, $target.parent(), function () {
- $this.trigger({
- type: 'shown'
- , relatedTarget: previous
- })
- })
- }
-
- , activate: function ( element, container, callback) {
- var $active = container.find('> .active')
- , transition = callback
- && $.support.transition
- && $active.hasClass('fade')
-
- function next() {
- $active
- .removeClass('active')
- .find('> .dropdown-menu > .active')
- .removeClass('active')
-
- element.addClass('active')
-
- if (transition) {
- element[0].offsetWidth // reflow for transition
- element.addClass('in')
- } else {
- element.removeClass('fade')
- }
-
- if ( element.parent('.dropdown-menu') ) {
- element.closest('li.dropdown').addClass('active')
- }
-
- callback && callback()
- }
-
- transition ?
- $active.one($.support.transition.end, next) :
- next()
-
- $active.removeClass('in')
- }
- }
-
-
- /* TAB PLUGIN DEFINITION
- * ===================== */
-
- var old = $.fn.tab
-
- $.fn.tab = function ( option ) {
- return this.each(function () {
- var $this = $(this)
- , data = $this.data('tab')
- if (!data) $this.data('tab', (data = new Tab(this)))
- if (typeof option == 'string') data[option]()
- })
- }
-
- $.fn.tab.Constructor = Tab
-
-
- /* TAB NO CONFLICT
- * =============== */
-
- $.fn.tab.noConflict = function () {
- $.fn.tab = old
- return this
- }
-
-
- /* TAB DATA-API
- * ============ */
-
- $(document).on('click.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (e) {
- e.preventDefault()
- $(this).tab('show')
- })
-
-}(window.jQuery);/* =============================================================
- * bootstrap-typeahead.js v2.3.2
- * http://twitter.github.com/bootstrap/javascript.html#typeahead
- * =============================================================
- * Copyright 2012 Twitter, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================================================ */
-
-
-!function($){
-
- "use strict"; // jshint ;_;
-
-
- /* TYPEAHEAD PUBLIC CLASS DEFINITION
- * ================================= */
-
- var Typeahead = function (element, options) {
- this.$element = $(element)
- this.options = $.extend({}, $.fn.typeahead.defaults, options)
- this.matcher = this.options.matcher || this.matcher
- this.sorter = this.options.sorter || this.sorter
- this.highlighter = this.options.highlighter || this.highlighter
- this.updater = this.options.updater || this.updater
- this.source = this.options.source
- this.$menu = $(this.options.menu)
- this.shown = false
- this.listen()
- }
-
- Typeahead.prototype = {
-
- constructor: Typeahead
-
- , select: function () {
- var val = this.$menu.find('.active').attr('data-value')
- this.$element
- .val(this.updater(val))
- .change()
- return this.hide()
- }
-
- , updater: function (item) {
- return item
- }
-
- , show: function () {
- var pos = $.extend({}, this.$element.position(), {
- height: this.$element[0].offsetHeight
- })
-
- this.$menu
- .insertAfter(this.$element)
- .css({
- top: pos.top + pos.height
- , left: pos.left
- })
- .show()
-
- this.shown = true
- return this
- }
-
- , hide: function () {
- this.$menu.hide()
- this.shown = false
- return this
- }
-
- , lookup: function (event) {
- var items
-
- this.query = this.$element.val()
-
- if (!this.query || this.query.length < this.options.minLength) {
- return this.shown ? this.hide() : this
- }
-
- items = $.isFunction(this.source) ? this.source(this.query, $.proxy(this.process, this)) : this.source
-
- return items ? this.process(items) : this
- }
-
- , process: function (items) {
- var that = this
-
- items = $.grep(items, function (item) {
- return that.matcher(item)
- })
-
- items = this.sorter(items)
-
- if (!items.length) {
- return this.shown ? this.hide() : this
- }
-
- return this.render(items.slice(0, this.options.items)).show()
- }
-
- , matcher: function (item) {
- return ~item.toLowerCase().indexOf(this.query.toLowerCase())
- }
-
- , sorter: function (items) {
- var beginswith = []
- , caseSensitive = []
- , caseInsensitive = []
- , item
-
- while (item = items.shift()) {
- if (!item.toLowerCase().indexOf(this.query.toLowerCase())) beginswith.push(item)
- else if (~item.indexOf(this.query)) caseSensitive.push(item)
- else caseInsensitive.push(item)
- }
-
- return beginswith.concat(caseSensitive, caseInsensitive)
- }
-
- , highlighter: function (item) {
- var query = this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, '\\$&')
- return item.replace(new RegExp('(' + query + ')', 'ig'), function ($1, match) {
- return '' + match + ' '
- })
- }
-
- , render: function (items) {
- var that = this
-
- items = $(items).map(function (i, item) {
- i = $(that.options.item).attr('data-value', item)
- i.find('a').html(that.highlighter(item))
- return i[0]
- })
-
- items.first().addClass('active')
- this.$menu.html(items)
- return this
- }
-
- , next: function (event) {
- var active = this.$menu.find('.active').removeClass('active')
- , next = active.next()
-
- if (!next.length) {
- next = $(this.$menu.find('li')[0])
- }
-
- next.addClass('active')
- }
-
- , prev: function (event) {
- var active = this.$menu.find('.active').removeClass('active')
- , prev = active.prev()
-
- if (!prev.length) {
- prev = this.$menu.find('li').last()
- }
-
- prev.addClass('active')
- }
-
- , listen: function () {
- this.$element
- .on('focus', $.proxy(this.focus, this))
- .on('blur', $.proxy(this.blur, this))
- .on('keypress', $.proxy(this.keypress, this))
- .on('keyup', $.proxy(this.keyup, this))
-
- if (this.eventSupported('keydown')) {
- this.$element.on('keydown', $.proxy(this.keydown, this))
- }
-
- this.$menu
- .on('click', $.proxy(this.click, this))
- .on('mouseenter', 'li', $.proxy(this.mouseenter, this))
- .on('mouseleave', 'li', $.proxy(this.mouseleave, this))
- }
-
- , eventSupported: function(eventName) {
- var isSupported = eventName in this.$element
- if (!isSupported) {
- this.$element.setAttribute(eventName, 'return;')
- isSupported = typeof this.$element[eventName] === 'function'
- }
- return isSupported
- }
-
- , move: function (e) {
- if (!this.shown) return
-
- switch(e.keyCode) {
- case 9: // tab
- case 13: // enter
- case 27: // escape
- e.preventDefault()
- break
-
- case 38: // up arrow
- e.preventDefault()
- this.prev()
- break
-
- case 40: // down arrow
- e.preventDefault()
- this.next()
- break
- }
-
- e.stopPropagation()
- }
-
- , keydown: function (e) {
- this.suppressKeyPressRepeat = ~$.inArray(e.keyCode, [40,38,9,13,27])
- this.move(e)
- }
-
- , keypress: function (e) {
- if (this.suppressKeyPressRepeat) return
- this.move(e)
- }
-
- , keyup: function (e) {
- switch(e.keyCode) {
- case 40: // down arrow
- case 38: // up arrow
- case 16: // shift
- case 17: // ctrl
- case 18: // alt
- break
-
- case 9: // tab
- case 13: // enter
- if (!this.shown) return
- this.select()
- break
-
- case 27: // escape
- if (!this.shown) return
- this.hide()
- break
-
- default:
- this.lookup()
- }
-
- e.stopPropagation()
- e.preventDefault()
- }
-
- , focus: function (e) {
- this.focused = true
- }
-
- , blur: function (e) {
- this.focused = false
- if (!this.mousedover && this.shown) this.hide()
- }
-
- , click: function (e) {
- e.stopPropagation()
- e.preventDefault()
- this.select()
- this.$element.focus()
- }
-
- , mouseenter: function (e) {
- this.mousedover = true
- this.$menu.find('.active').removeClass('active')
- $(e.currentTarget).addClass('active')
- }
-
- , mouseleave: function (e) {
- this.mousedover = false
- if (!this.focused && this.shown) this.hide()
- }
-
- }
-
-
- /* TYPEAHEAD PLUGIN DEFINITION
- * =========================== */
-
- var old = $.fn.typeahead
-
- $.fn.typeahead = function (option) {
- return this.each(function () {
- var $this = $(this)
- , data = $this.data('typeahead')
- , options = typeof option == 'object' && option
- if (!data) $this.data('typeahead', (data = new Typeahead(this, options)))
- if (typeof option == 'string') data[option]()
- })
- }
-
- $.fn.typeahead.defaults = {
- source: []
- , items: 8
- , menu: ''
- , item: ' '
- , minLength: 1
- }
-
- $.fn.typeahead.Constructor = Typeahead
-
-
- /* TYPEAHEAD NO CONFLICT
- * =================== */
-
- $.fn.typeahead.noConflict = function () {
- $.fn.typeahead = old
- return this
- }
-
-
- /* TYPEAHEAD DATA-API
- * ================== */
-
- $(document).on('focus.typeahead.data-api', '[data-provide="typeahead"]', function (e) {
- var $this = $(this)
- if ($this.data('typeahead')) return
- $this.typeahead($this.data())
- })
-
-}(window.jQuery);
-/* ==========================================================
- * bootstrap-affix.js v2.3.2
- * http://twitter.github.com/bootstrap/javascript.html#affix
- * ==========================================================
- * Copyright 2012 Twitter, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ========================================================== */
-
-
-!function ($) {
-
- "use strict"; // jshint ;_;
-
-
- /* AFFIX CLASS DEFINITION
- * ====================== */
-
- var Affix = function (element, options) {
- this.options = $.extend({}, $.fn.affix.defaults, options)
- this.$window = $(window)
- .on('scroll.affix.data-api', $.proxy(this.checkPosition, this))
- .on('click.affix.data-api', $.proxy(function () { setTimeout($.proxy(this.checkPosition, this), 1) }, this))
- this.$element = $(element)
- this.checkPosition()
- }
-
- Affix.prototype.checkPosition = function () {
- if (!this.$element.is(':visible')) return
-
- var scrollHeight = $(document).height()
- , scrollTop = this.$window.scrollTop()
- , position = this.$element.offset()
- , offset = this.options.offset
- , offsetBottom = offset.bottom
- , offsetTop = offset.top
- , reset = 'affix affix-top affix-bottom'
- , affix
-
- if (typeof offset != 'object') offsetBottom = offsetTop = offset
- if (typeof offsetTop == 'function') offsetTop = offset.top()
- if (typeof offsetBottom == 'function') offsetBottom = offset.bottom()
-
- affix = this.unpin != null && (scrollTop + this.unpin <= position.top) ?
- false : offsetBottom != null && (position.top + this.$element.height() >= scrollHeight - offsetBottom) ?
- 'bottom' : offsetTop != null && scrollTop <= offsetTop ?
- 'top' : false
-
- if (this.affixed === affix) return
-
- this.affixed = affix
- this.unpin = affix == 'bottom' ? position.top - scrollTop : null
-
- this.$element.removeClass(reset).addClass('affix' + (affix ? '-' + affix : ''))
- }
-
-
- /* AFFIX PLUGIN DEFINITION
- * ======================= */
-
- var old = $.fn.affix
-
- $.fn.affix = function (option) {
- return this.each(function () {
- var $this = $(this)
- , data = $this.data('affix')
- , options = typeof option == 'object' && option
- if (!data) $this.data('affix', (data = new Affix(this, options)))
- if (typeof option == 'string') data[option]()
- })
- }
-
- $.fn.affix.Constructor = Affix
-
- $.fn.affix.defaults = {
- offset: 0
- }
-
-
- /* AFFIX NO CONFLICT
- * ================= */
-
- $.fn.affix.noConflict = function () {
- $.fn.affix = old
- return this
- }
-
-
- /* AFFIX DATA-API
- * ============== */
-
- $(window).on('load', function () {
- $('[data-spy="affix"]').each(function () {
- var $spy = $(this)
- , data = $spy.data()
-
- data.offset = data.offset || {}
-
- data.offsetBottom && (data.offset.bottom = data.offsetBottom)
- data.offsetTop && (data.offset.top = data.offsetTop)
-
- $spy.affix(data)
- })
- })
-
-
-}(window.jQuery);
\ No newline at end of file
diff --git a/js_old/libs/bootstrap.min.js b/js_old/libs/bootstrap.min.js
deleted file mode 100644
index f9cbdae..0000000
--- a/js_old/libs/bootstrap.min.js
+++ /dev/null
@@ -1,6 +0,0 @@
-/*!
-* Bootstrap.js by @fat & @mdo
-* Copyright 2012 Twitter, Inc.
-* http://www.apache.org/licenses/LICENSE-2.0.txt
-*/
-!function(e){"use strict";e(function(){e.support.transition=function(){var e=function(){var e=document.createElement("bootstrap"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},n;for(n in t)if(e.style[n]!==undefined)return t[n]}();return e&&{end:e}}()})}(window.jQuery),!function(e){"use strict";var t='[data-dismiss="alert"]',n=function(n){e(n).on("click",t,this.close)};n.prototype.close=function(t){function s(){i.trigger("closed").remove()}var n=e(this),r=n.attr("data-target"),i;r||(r=n.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,"")),i=e(r),t&&t.preventDefault(),i.length||(i=n.hasClass("alert")?n:n.parent()),i.trigger(t=e.Event("close"));if(t.isDefaultPrevented())return;i.removeClass("in"),e.support.transition&&i.hasClass("fade")?i.on(e.support.transition.end,s):s()};var r=e.fn.alert;e.fn.alert=function(t){return this.each(function(){var r=e(this),i=r.data("alert");i||r.data("alert",i=new n(this)),typeof t=="string"&&i[t].call(r)})},e.fn.alert.Constructor=n,e.fn.alert.noConflict=function(){return e.fn.alert=r,this},e(document).on("click.alert.data-api",t,n.prototype.close)}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.button.defaults,n)};t.prototype.setState=function(e){var t="disabled",n=this.$element,r=n.data(),i=n.is("input")?"val":"html";e+="Text",r.resetText||n.data("resetText",n[i]()),n[i](r[e]||this.options[e]),setTimeout(function(){e=="loadingText"?n.addClass(t).attr(t,t):n.removeClass(t).removeAttr(t)},0)},t.prototype.toggle=function(){var e=this.$element.closest('[data-toggle="buttons-radio"]');e&&e.find(".active").removeClass("active"),this.$element.toggleClass("active")};var n=e.fn.button;e.fn.button=function(n){return this.each(function(){var r=e(this),i=r.data("button"),s=typeof n=="object"&&n;i||r.data("button",i=new t(this,s)),n=="toggle"?i.toggle():n&&i.setState(n)})},e.fn.button.defaults={loadingText:"loading..."},e.fn.button.Constructor=t,e.fn.button.noConflict=function(){return e.fn.button=n,this},e(document).on("click.button.data-api","[data-toggle^=button]",function(t){var n=e(t.target);n.hasClass("btn")||(n=n.closest(".btn")),n.button("toggle")})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.$indicators=this.$element.find(".carousel-indicators"),this.options=n,this.options.pause=="hover"&&this.$element.on("mouseenter",e.proxy(this.pause,this)).on("mouseleave",e.proxy(this.cycle,this))};t.prototype={cycle:function(t){return t||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(e.proxy(this.next,this),this.options.interval)),this},getActiveIndex:function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},to:function(t){var n=this.getActiveIndex(),r=this;if(t>this.$items.length-1||t<0)return;return this.sliding?this.$element.one("slid",function(){r.to(t)}):n==t?this.pause().cycle():this.slide(t>n?"next":"prev",e(this.$items[t]))},pause:function(t){return t||(this.paused=!0),this.$element.find(".next, .prev").length&&e.support.transition.end&&(this.$element.trigger(e.support.transition.end),this.cycle(!0)),clearInterval(this.interval),this.interval=null,this},next:function(){if(this.sliding)return;return this.slide("next")},prev:function(){if(this.sliding)return;return this.slide("prev")},slide:function(t,n){var r=this.$element.find(".item.active"),i=n||r[t](),s=this.interval,o=t=="next"?"left":"right",u=t=="next"?"first":"last",a=this,f;this.sliding=!0,s&&this.pause(),i=i.length?i:this.$element.find(".item")[u](),f=e.Event("slide",{relatedTarget:i[0],direction:o});if(i.hasClass("active"))return;this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid",function(){var t=e(a.$indicators.children()[a.getActiveIndex()]);t&&t.addClass("active")}));if(e.support.transition&&this.$element.hasClass("slide")){this.$element.trigger(f);if(f.isDefaultPrevented())return;i.addClass(t),i[0].offsetWidth,r.addClass(o),i.addClass(o),this.$element.one(e.support.transition.end,function(){i.removeClass([t,o].join(" ")).addClass("active"),r.removeClass(["active",o].join(" ")),a.sliding=!1,setTimeout(function(){a.$element.trigger("slid")},0)})}else{this.$element.trigger(f);if(f.isDefaultPrevented())return;r.removeClass("active"),i.addClass("active"),this.sliding=!1,this.$element.trigger("slid")}return s&&this.cycle(),this}};var n=e.fn.carousel;e.fn.carousel=function(n){return this.each(function(){var r=e(this),i=r.data("carousel"),s=e.extend({},e.fn.carousel.defaults,typeof n=="object"&&n),o=typeof n=="string"?n:s.slide;i||r.data("carousel",i=new t(this,s)),typeof n=="number"?i.to(n):o?i[o]():s.interval&&i.pause().cycle()})},e.fn.carousel.defaults={interval:5e3,pause:"hover"},e.fn.carousel.Constructor=t,e.fn.carousel.noConflict=function(){return e.fn.carousel=n,this},e(document).on("click.carousel.data-api","[data-slide], [data-slide-to]",function(t){var n=e(this),r,i=e(n.attr("data-target")||(r=n.attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,"")),s=e.extend({},i.data(),n.data()),o;i.carousel(s),(o=n.attr("data-slide-to"))&&i.data("carousel").pause().to(o).cycle(),t.preventDefault()})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.collapse.defaults,n),this.options.parent&&(this.$parent=e(this.options.parent)),this.options.toggle&&this.toggle()};t.prototype={constructor:t,dimension:function(){var e=this.$element.hasClass("width");return e?"width":"height"},show:function(){var t,n,r,i;if(this.transitioning||this.$element.hasClass("in"))return;t=this.dimension(),n=e.camelCase(["scroll",t].join("-")),r=this.$parent&&this.$parent.find("> .accordion-group > .in");if(r&&r.length){i=r.data("collapse");if(i&&i.transitioning)return;r.collapse("hide"),i||r.data("collapse",null)}this.$element[t](0),this.transition("addClass",e.Event("show"),"shown"),e.support.transition&&this.$element[t](this.$element[0][n])},hide:function(){var t;if(this.transitioning||!this.$element.hasClass("in"))return;t=this.dimension(),this.reset(this.$element[t]()),this.transition("removeClass",e.Event("hide"),"hidden"),this.$element[t](0)},reset:function(e){var t=this.dimension();return this.$element.removeClass("collapse")[t](e||"auto")[0].offsetWidth,this.$element[e!==null?"addClass":"removeClass"]("collapse"),this},transition:function(t,n,r){var i=this,s=function(){n.type=="show"&&i.reset(),i.transitioning=0,i.$element.trigger(r)};this.$element.trigger(n);if(n.isDefaultPrevented())return;this.transitioning=1,this.$element[t]("in"),e.support.transition&&this.$element.hasClass("collapse")?this.$element.one(e.support.transition.end,s):s()},toggle:function(){this[this.$element.hasClass("in")?"hide":"show"]()}};var n=e.fn.collapse;e.fn.collapse=function(n){return this.each(function(){var r=e(this),i=r.data("collapse"),s=e.extend({},e.fn.collapse.defaults,r.data(),typeof n=="object"&&n);i||r.data("collapse",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.collapse.defaults={toggle:!0},e.fn.collapse.Constructor=t,e.fn.collapse.noConflict=function(){return e.fn.collapse=n,this},e(document).on("click.collapse.data-api","[data-toggle=collapse]",function(t){var n=e(this),r,i=n.attr("data-target")||t.preventDefault()||(r=n.attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,""),s=e(i).data("collapse")?"toggle":n.data();n[e(i).hasClass("in")?"addClass":"removeClass"]("collapsed"),e(i).collapse(s)})}(window.jQuery),!function(e){"use strict";function r(){e(".dropdown-backdrop").remove(),e(t).each(function(){i(e(this)).removeClass("open")})}function i(t){var n=t.attr("data-target"),r;n||(n=t.attr("href"),n=n&&/#/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,"")),r=n&&e(n);if(!r||!r.length)r=t.parent();return r}var t="[data-toggle=dropdown]",n=function(t){var n=e(t).on("click.dropdown.data-api",this.toggle);e("html").on("click.dropdown.data-api",function(){n.parent().removeClass("open")})};n.prototype={constructor:n,toggle:function(t){var n=e(this),s,o;if(n.is(".disabled, :disabled"))return;return s=i(n),o=s.hasClass("open"),r(),o||("ontouchstart"in document.documentElement&&e('
').insertBefore(e(this)).on("click",r),s.toggleClass("open")),n.focus(),!1},keydown:function(n){var r,s,o,u,a,f;if(!/(38|40|27)/.test(n.keyCode))return;r=e(this),n.preventDefault(),n.stopPropagation();if(r.is(".disabled, :disabled"))return;u=i(r),a=u.hasClass("open");if(!a||a&&n.keyCode==27)return n.which==27&&u.find(t).focus(),r.click();s=e("[role=menu] li:not(.divider):visible a",u);if(!s.length)return;f=s.index(s.filter(":focus")),n.keyCode==38&&f>0&&f--,n.keyCode==40&&f ').appendTo(document.body),this.$backdrop.click(this.options.backdrop=="static"?e.proxy(this.$element[0].focus,this.$element[0]):e.proxy(this.hide,this)),i&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in");if(!t)return;i?this.$backdrop.one(e.support.transition.end,t):t()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),e.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(e.support.transition.end,t):t()):t&&t()}};var n=e.fn.modal;e.fn.modal=function(n){return this.each(function(){var r=e(this),i=r.data("modal"),s=e.extend({},e.fn.modal.defaults,r.data(),typeof n=="object"&&n);i||r.data("modal",i=new t(this,s)),typeof n=="string"?i[n]():s.show&&i.show()})},e.fn.modal.defaults={backdrop:!0,keyboard:!0,show:!0},e.fn.modal.Constructor=t,e.fn.modal.noConflict=function(){return e.fn.modal=n,this},e(document).on("click.modal.data-api",'[data-toggle="modal"]',function(t){var n=e(this),r=n.attr("href"),i=e(n.attr("data-target")||r&&r.replace(/.*(?=#[^\s]+$)/,"")),s=i.data("modal")?"toggle":e.extend({remote:!/#/.test(r)&&r},i.data(),n.data());t.preventDefault(),i.modal(s).one("hide",function(){n.focus()})})}(window.jQuery),!function(e){"use strict";var t=function(e,t){this.init("tooltip",e,t)};t.prototype={constructor:t,init:function(t,n,r){var i,s,o,u,a;this.type=t,this.$element=e(n),this.options=this.getOptions(r),this.enabled=!0,o=this.options.trigger.split(" ");for(a=o.length;a--;)u=o[a],u=="click"?this.$element.on("click."+this.type,this.options.selector,e.proxy(this.toggle,this)):u!="manual"&&(i=u=="hover"?"mouseenter":"focus",s=u=="hover"?"mouseleave":"blur",this.$element.on(i+"."+this.type,this.options.selector,e.proxy(this.enter,this)),this.$element.on(s+"."+this.type,this.options.selector,e.proxy(this.leave,this)));this.options.selector?this._options=e.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},getOptions:function(t){return t=e.extend({},e.fn[this.type].defaults,this.$element.data(),t),t.delay&&typeof t.delay=="number"&&(t.delay={show:t.delay,hide:t.delay}),t},enter:function(t){var n=e.fn[this.type].defaults,r={},i;this._options&&e.each(this._options,function(e,t){n[e]!=t&&(r[e]=t)},this),i=e(t.currentTarget)[this.type](r).data(this.type);if(!i.options.delay||!i.options.delay.show)return i.show();clearTimeout(this.timeout),i.hoverState="in",this.timeout=setTimeout(function(){i.hoverState=="in"&&i.show()},i.options.delay.show)},leave:function(t){var n=e(t.currentTarget)[this.type](this._options).data(this.type);this.timeout&&clearTimeout(this.timeout);if(!n.options.delay||!n.options.delay.hide)return n.hide();n.hoverState="out",this.timeout=setTimeout(function(){n.hoverState=="out"&&n.hide()},n.options.delay.hide)},show:function(){var t,n,r,i,s,o,u=e.Event("show");if(this.hasContent()&&this.enabled){this.$element.trigger(u);if(u.isDefaultPrevented())return;t=this.tip(),this.setContent(),this.options.animation&&t.addClass("fade"),s=typeof this.options.placement=="function"?this.options.placement.call(this,t[0],this.$element[0]):this.options.placement,t.detach().css({top:0,left:0,display:"block"}),this.options.container?t.appendTo(this.options.container):t.insertAfter(this.$element),n=this.getPosition(),r=t[0].offsetWidth,i=t[0].offsetHeight;switch(s){case"bottom":o={top:n.top+n.height,left:n.left+n.width/2-r/2};break;case"top":o={top:n.top-i,left:n.left+n.width/2-r/2};break;case"left":o={top:n.top+n.height/2-i/2,left:n.left-r};break;case"right":o={top:n.top+n.height/2-i/2,left:n.left+n.width}}this.applyPlacement(o,s),this.$element.trigger("shown")}},applyPlacement:function(e,t){var n=this.tip(),r=n[0].offsetWidth,i=n[0].offsetHeight,s,o,u,a;n.offset(e).addClass(t).addClass("in"),s=n[0].offsetWidth,o=n[0].offsetHeight,t=="top"&&o!=i&&(e.top=e.top+i-o,a=!0),t=="bottom"||t=="top"?(u=0,e.left<0&&(u=e.left*-2,e.left=0,n.offset(e),s=n[0].offsetWidth,o=n[0].offsetHeight),this.replaceArrow(u-r+s,s,"left")):this.replaceArrow(o-i,o,"top"),a&&n.offset(e)},replaceArrow:function(e,t,n){this.arrow().css(n,e?50*(1-e/t)+"%":"")},setContent:function(){var e=this.tip(),t=this.getTitle();e.find(".tooltip-inner")[this.options.html?"html":"text"](t),e.removeClass("fade in top bottom left right")},hide:function(){function i(){var t=setTimeout(function(){n.off(e.support.transition.end).detach()},500);n.one(e.support.transition.end,function(){clearTimeout(t),n.detach()})}var t=this,n=this.tip(),r=e.Event("hide");this.$element.trigger(r);if(r.isDefaultPrevented())return;return n.removeClass("in"),e.support.transition&&this.$tip.hasClass("fade")?i():n.detach(),this.$element.trigger("hidden"),this},fixTitle:function(){var e=this.$element;(e.attr("title")||typeof e.attr("data-original-title")!="string")&&e.attr("data-original-title",e.attr("title")||"").attr("title","")},hasContent:function(){return this.getTitle()},getPosition:function(){var t=this.$element[0];return e.extend({},typeof t.getBoundingClientRect=="function"?t.getBoundingClientRect():{width:t.offsetWidth,height:t.offsetHeight},this.$element.offset())},getTitle:function(){var e,t=this.$element,n=this.options;return e=t.attr("data-original-title")||(typeof n.title=="function"?n.title.call(t[0]):n.title),e},tip:function(){return this.$tip=this.$tip||e(this.options.template)},arrow:function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},validate:function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},toggleEnabled:function(){this.enabled=!this.enabled},toggle:function(t){var n=t?e(t.currentTarget)[this.type](this._options).data(this.type):this;n.tip().hasClass("in")?n.hide():n.show()},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}};var n=e.fn.tooltip;e.fn.tooltip=function(n){return this.each(function(){var r=e(this),i=r.data("tooltip"),s=typeof n=="object"&&n;i||r.data("tooltip",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.tooltip.Constructor=t,e.fn.tooltip.defaults={animation:!0,placement:"top",selector:!1,template:'',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},e.fn.tooltip.noConflict=function(){return e.fn.tooltip=n,this}}(window.jQuery),!function(e){"use strict";var t=function(e,t){this.init("popover",e,t)};t.prototype=e.extend({},e.fn.tooltip.Constructor.prototype,{constructor:t,setContent:function(){var e=this.tip(),t=this.getTitle(),n=this.getContent();e.find(".popover-title")[this.options.html?"html":"text"](t),e.find(".popover-content")[this.options.html?"html":"text"](n),e.removeClass("fade top bottom left right in")},hasContent:function(){return this.getTitle()||this.getContent()},getContent:function(){var e,t=this.$element,n=this.options;return e=(typeof n.content=="function"?n.content.call(t[0]):n.content)||t.attr("data-content"),e},tip:function(){return this.$tip||(this.$tip=e(this.options.template)),this.$tip},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}});var n=e.fn.popover;e.fn.popover=function(n){return this.each(function(){var r=e(this),i=r.data("popover"),s=typeof n=="object"&&n;i||r.data("popover",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.popover.Constructor=t,e.fn.popover.defaults=e.extend({},e.fn.tooltip.defaults,{placement:"right",trigger:"click",content:"",template:''}),e.fn.popover.noConflict=function(){return e.fn.popover=n,this}}(window.jQuery),!function(e){"use strict";function t(t,n){var r=e.proxy(this.process,this),i=e(t).is("body")?e(window):e(t),s;this.options=e.extend({},e.fn.scrollspy.defaults,n),this.$scrollElement=i.on("scroll.scroll-spy.data-api",r),this.selector=(this.options.target||(s=e(t).attr("href"))&&s.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.$body=e("body"),this.refresh(),this.process()}t.prototype={constructor:t,refresh:function(){var t=this,n;this.offsets=e([]),this.targets=e([]),n=this.$body.find(this.selector).map(function(){var n=e(this),r=n.data("target")||n.attr("href"),i=/^#\w/.test(r)&&e(r);return i&&i.length&&[[i.position().top+(!e.isWindow(t.$scrollElement.get(0))&&t.$scrollElement.scrollTop()),r]]||null}).sort(function(e,t){return e[0]-t[0]}).each(function(){t.offsets.push(this[0]),t.targets.push(this[1])})},process:function(){var e=this.$scrollElement.scrollTop()+this.options.offset,t=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,n=t-this.$scrollElement.height(),r=this.offsets,i=this.targets,s=this.activeTarget,o;if(e>=n)return s!=(o=i.last()[0])&&this.activate(o);for(o=r.length;o--;)s!=i[o]&&e>=r[o]&&(!r[o+1]||e<=r[o+1])&&this.activate(i[o])},activate:function(t){var n,r;this.activeTarget=t,e(this.selector).parent(".active").removeClass("active"),r=this.selector+'[data-target="'+t+'"],'+this.selector+'[href="'+t+'"]',n=e(r).parent("li").addClass("active"),n.parent(".dropdown-menu").length&&(n=n.closest("li.dropdown").addClass("active")),n.trigger("activate")}};var n=e.fn.scrollspy;e.fn.scrollspy=function(n){return this.each(function(){var r=e(this),i=r.data("scrollspy"),s=typeof n=="object"&&n;i||r.data("scrollspy",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.scrollspy.Constructor=t,e.fn.scrollspy.defaults={offset:10},e.fn.scrollspy.noConflict=function(){return e.fn.scrollspy=n,this},e(window).on("load",function(){e('[data-spy="scroll"]').each(function(){var t=e(this);t.scrollspy(t.data())})})}(window.jQuery),!function(e){"use strict";var t=function(t){this.element=e(t)};t.prototype={constructor:t,show:function(){var t=this.element,n=t.closest("ul:not(.dropdown-menu)"),r=t.attr("data-target"),i,s,o;r||(r=t.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,""));if(t.parent("li").hasClass("active"))return;i=n.find(".active:last a")[0],o=e.Event("show",{relatedTarget:i}),t.trigger(o);if(o.isDefaultPrevented())return;s=e(r),this.activate(t.parent("li"),n),this.activate(s,s.parent(),function(){t.trigger({type:"shown",relatedTarget:i})})},activate:function(t,n,r){function o(){i.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),t.addClass("active"),s?(t[0].offsetWidth,t.addClass("in")):t.removeClass("fade"),t.parent(".dropdown-menu")&&t.closest("li.dropdown").addClass("active"),r&&r()}var i=n.find("> .active"),s=r&&e.support.transition&&i.hasClass("fade");s?i.one(e.support.transition.end,o):o(),i.removeClass("in")}};var n=e.fn.tab;e.fn.tab=function(n){return this.each(function(){var r=e(this),i=r.data("tab");i||r.data("tab",i=new t(this)),typeof n=="string"&&i[n]()})},e.fn.tab.Constructor=t,e.fn.tab.noConflict=function(){return e.fn.tab=n,this},e(document).on("click.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(t){t.preventDefault(),e(this).tab("show")})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.typeahead.defaults,n),this.matcher=this.options.matcher||this.matcher,this.sorter=this.options.sorter||this.sorter,this.highlighter=this.options.highlighter||this.highlighter,this.updater=this.options.updater||this.updater,this.source=this.options.source,this.$menu=e(this.options.menu),this.shown=!1,this.listen()};t.prototype={constructor:t,select:function(){var e=this.$menu.find(".active").attr("data-value");return this.$element.val(this.updater(e)).change(),this.hide()},updater:function(e){return e},show:function(){var t=e.extend({},this.$element.position(),{height:this.$element[0].offsetHeight});return this.$menu.insertAfter(this.$element).css({top:t.top+t.height,left:t.left}).show(),this.shown=!0,this},hide:function(){return this.$menu.hide(),this.shown=!1,this},lookup:function(t){var n;return this.query=this.$element.val(),!this.query||this.query.length"+t+""})},render:function(t){var n=this;return t=e(t).map(function(t,r){return t=e(n.options.item).attr("data-value",r),t.find("a").html(n.highlighter(r)),t[0]}),t.first().addClass("active"),this.$menu.html(t),this},next:function(t){var n=this.$menu.find(".active").removeClass("active"),r=n.next();r.length||(r=e(this.$menu.find("li")[0])),r.addClass("active")},prev:function(e){var t=this.$menu.find(".active").removeClass("active"),n=t.prev();n.length||(n=this.$menu.find("li").last()),n.addClass("active")},listen:function(){this.$element.on("focus",e.proxy(this.focus,this)).on("blur",e.proxy(this.blur,this)).on("keypress",e.proxy(this.keypress,this)).on("keyup",e.proxy(this.keyup,this)),this.eventSupported("keydown")&&this.$element.on("keydown",e.proxy(this.keydown,this)),this.$menu.on("click",e.proxy(this.click,this)).on("mouseenter","li",e.proxy(this.mouseenter,this)).on("mouseleave","li",e.proxy(this.mouseleave,this))},eventSupported:function(e){var t=e in this.$element;return t||(this.$element.setAttribute(e,"return;"),t=typeof this.$element[e]=="function"),t},move:function(e){if(!this.shown)return;switch(e.keyCode){case 9:case 13:case 27:e.preventDefault();break;case 38:e.preventDefault(),this.prev();break;case 40:e.preventDefault(),this.next()}e.stopPropagation()},keydown:function(t){this.suppressKeyPressRepeat=~e.inArray(t.keyCode,[40,38,9,13,27]),this.move(t)},keypress:function(e){if(this.suppressKeyPressRepeat)return;this.move(e)},keyup:function(e){switch(e.keyCode){case 40:case 38:case 16:case 17:case 18:break;case 9:case 13:if(!this.shown)return;this.select();break;case 27:if(!this.shown)return;this.hide();break;default:this.lookup()}e.stopPropagation(),e.preventDefault()},focus:function(e){this.focused=!0},blur:function(e){this.focused=!1,!this.mousedover&&this.shown&&this.hide()},click:function(e){e.stopPropagation(),e.preventDefault(),this.select(),this.$element.focus()},mouseenter:function(t){this.mousedover=!0,this.$menu.find(".active").removeClass("active"),e(t.currentTarget).addClass("active")},mouseleave:function(e){this.mousedover=!1,!this.focused&&this.shown&&this.hide()}};var n=e.fn.typeahead;e.fn.typeahead=function(n){return this.each(function(){var r=e(this),i=r.data("typeahead"),s=typeof n=="object"&&n;i||r.data("typeahead",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.typeahead.defaults={source:[],items:8,menu:'',item:' ',minLength:1},e.fn.typeahead.Constructor=t,e.fn.typeahead.noConflict=function(){return e.fn.typeahead=n,this},e(document).on("focus.typeahead.data-api",'[data-provide="typeahead"]',function(t){var n=e(this);if(n.data("typeahead"))return;n.typeahead(n.data())})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.options=e.extend({},e.fn.affix.defaults,n),this.$window=e(window).on("scroll.affix.data-api",e.proxy(this.checkPosition,this)).on("click.affix.data-api",e.proxy(function(){setTimeout(e.proxy(this.checkPosition,this),1)},this)),this.$element=e(t),this.checkPosition()};t.prototype.checkPosition=function(){if(!this.$element.is(":visible"))return;var t=e(document).height(),n=this.$window.scrollTop(),r=this.$element.offset(),i=this.options.offset,s=i.bottom,o=i.top,u="affix affix-top affix-bottom",a;typeof i!="object"&&(s=o=i),typeof o=="function"&&(o=i.top()),typeof s=="function"&&(s=i.bottom()),a=this.unpin!=null&&n+this.unpin<=r.top?!1:s!=null&&r.top+this.$element.height()>=t-s?"bottom":o!=null&&n<=o?"top":!1;if(this.affixed===a)return;this.affixed=a,this.unpin=a=="bottom"?r.top-n:null,this.$element.removeClass(u).addClass("affix"+(a?"-"+a:""))};var n=e.fn.affix;e.fn.affix=function(n){return this.each(function(){var r=e(this),i=r.data("affix"),s=typeof n=="object"&&n;i||r.data("affix",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.affix.Constructor=t,e.fn.affix.defaults={offset:0},e.fn.affix.noConflict=function(){return e.fn.affix=n,this},e(window).on("load",function(){e('[data-spy="affix"]').each(function(){var t=e(this),n=t.data();n.offset=n.offset||{},n.offsetBottom&&(n.offset.bottom=n.offsetBottom),n.offsetTop&&(n.offset.top=n.offsetTop),t.affix(n)})})}(window.jQuery);
\ No newline at end of file
diff --git a/js_old/libs/excanvas.compiled.js b/js_old/libs/excanvas.compiled.js
deleted file mode 100644
index a34ca1d..0000000
--- a/js_old/libs/excanvas.compiled.js
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright 2006 Google Inc.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-document.createElement("canvas").getContext||(function(){var s=Math,j=s.round,F=s.sin,G=s.cos,V=s.abs,W=s.sqrt,k=10,v=k/2;function X(){return this.context_||(this.context_=new H(this))}var L=Array.prototype.slice;function Y(b,a){var c=L.call(arguments,2);return function(){return b.apply(a,c.concat(L.call(arguments)))}}var M={init:function(b){if(/MSIE/.test(navigator.userAgent)&&!window.opera){var a=b||document;a.createElement("canvas");a.attachEvent("onreadystatechange",Y(this.init_,this,a))}},init_:function(b){b.namespaces.g_vml_||
-b.namespaces.add("g_vml_","urn:schemas-microsoft-com:vml","#default#VML");b.namespaces.g_o_||b.namespaces.add("g_o_","urn:schemas-microsoft-com:office:office","#default#VML");if(!b.styleSheets.ex_canvas_){var a=b.createStyleSheet();a.owningElement.id="ex_canvas_";a.cssText="canvas{display:inline-block;overflow:hidden;text-align:left;width:300px;height:150px}g_vml_\\:*{behavior:url(#default#VML)}g_o_\\:*{behavior:url(#default#VML)}"}var c=b.getElementsByTagName("canvas"),d=0;for(;d',' ","");this.element_.insertAdjacentHTML("BeforeEnd",t.join(""))};i.stroke=function(b){var a=[],c=P(b?this.fillStyle:this.strokeStyle),d=c.color,f=c.alpha*this.globalAlpha;a.push("g.x)g.x=e.x;if(h.y==null||e.yg.y)g.y=e.y}}a.push(' ">');if(b)if(typeof this.fillStyle=="object"){var m=this.fillStyle,r=0,n={x:0,y:0},o=0,q=1;if(m.type_=="gradient"){var t=m.x1_/this.arcScaleX_,E=m.y1_/this.arcScaleY_,p=this.getCoords_(m.x0_/this.arcScaleX_,m.y0_/this.arcScaleY_),
-z=this.getCoords_(t,E);r=Math.atan2(z.x-p.x,z.y-p.y)*180/Math.PI;if(r<0)r+=360;if(r<1.0E-6)r=0}else{var p=this.getCoords_(m.x0_,m.y0_),w=g.x-h.x,x=g.y-h.y;n={x:(p.x-h.x)/w,y:(p.y-h.y)/x};w/=this.arcScaleX_*k;x/=this.arcScaleY_*k;var R=s.max(w,x);o=2*m.r0_/R;q=2*m.r1_/R-o}var u=m.colors_;u.sort(function(ba,ca){return ba.offset-ca.offset});var J=u.length,da=u[0].color,ea=u[J-1].color,fa=u[0].alpha*this.globalAlpha,ga=u[J-1].alpha*this.globalAlpha,S=[],l=0;for(;l ')}else a.push(' ');else{var K=this.lineScale_*this.lineWidth;if(K<1)f*=K;a.push(" ')}a.push(" ");this.element_.insertAdjacentHTML("beforeEnd",a.join(""))};i.fill=function(){this.stroke(true)};i.closePath=function(){this.currentPath_.push({type:"close"})};i.getCoords_=function(b,a){var c=this.m_;return{x:k*(b*c[0][0]+a*c[1][0]+c[2][0])-v,y:k*(b*c[0][1]+a*c[1][1]+c[2][1])-v}};i.save=function(){var b={};O(this,b);this.aStack_.push(b);this.mStack_.push(this.m_);this.m_=y(I(),this.m_)};i.restore=function(){O(this.aStack_.pop(),
-this);this.m_=this.mStack_.pop()};function ha(b){var a=0;for(;a<3;a++){var c=0;for(;c<2;c++)if(!isFinite(b[a][c])||isNaN(b[a][c]))return false}return true}function A(b,a,c){if(!!ha(a)){b.m_=a;if(c)b.lineScale_=W(V(a[0][0]*a[1][1]-a[0][1]*a[1][0]))}}i.translate=function(b,a){A(this,y([[1,0,0],[0,1,0],[b,a,1]],this.m_),false)};i.rotate=function(b){var a=G(b),c=F(b);A(this,y([[a,c,0],[-c,a,0],[0,0,1]],this.m_),false)};i.scale=function(b,a){this.arcScaleX_*=b;this.arcScaleY_*=a;A(this,y([[b,0,0],[0,a,
-0],[0,0,1]],this.m_),true)};i.transform=function(b,a,c,d,f,h){A(this,y([[b,a,0],[c,d,0],[f,h,1]],this.m_),true)};i.setTransform=function(b,a,c,d,f,h){A(this,[[b,a,0],[c,d,0],[f,h,1]],true)};i.clip=function(){};i.arcTo=function(){};i.createPattern=function(){return new U};function D(b){this.type_=b;this.r1_=this.y1_=this.x1_=this.r0_=this.y0_=this.x0_=0;this.colors_=[]}D.prototype.addColorStop=function(b,a){a=P(a);this.colors_.push({offset:b,color:a.color,alpha:a.alpha})};function U(){}G_vmlCanvasManager=
-M;CanvasRenderingContext2D=H;CanvasGradient=D;CanvasPattern=U})();
diff --git a/js_old/libs/excanvas.js b/js_old/libs/excanvas.js
deleted file mode 100644
index 367764b..0000000
--- a/js_old/libs/excanvas.js
+++ /dev/null
@@ -1,924 +0,0 @@
-// Copyright 2006 Google Inc.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-
-// Known Issues:
-//
-// * Patterns are not implemented.
-// * Radial gradient are not implemented. The VML version of these look very
-// different from the canvas one.
-// * Clipping paths are not implemented.
-// * Coordsize. The width and height attribute have higher priority than the
-// width and height style values which isn't correct.
-// * Painting mode isn't implemented.
-// * Canvas width/height should is using content-box by default. IE in
-// Quirks mode will draw the canvas using border-box. Either change your
-// doctype to HTML5
-// (http://www.whatwg.org/specs/web-apps/current-work/#the-doctype)
-// or use Box Sizing Behavior from WebFX
-// (http://webfx.eae.net/dhtml/boxsizing/boxsizing.html)
-// * Non uniform scaling does not correctly scale strokes.
-// * Optimize. There is always room for speed improvements.
-
-// Only add this code if we do not already have a canvas implementation
-if (!document.createElement('canvas').getContext) {
-
-(function() {
-
- // alias some functions to make (compiled) code shorter
- var m = Math;
- var mr = m.round;
- var ms = m.sin;
- var mc = m.cos;
- var abs = m.abs;
- var sqrt = m.sqrt;
-
- // this is used for sub pixel precision
- var Z = 10;
- var Z2 = Z / 2;
-
- /**
- * This funtion is assigned to the elements as element.getContext().
- * @this {HTMLElement}
- * @return {CanvasRenderingContext2D_}
- */
- function getContext() {
- return this.context_ ||
- (this.context_ = new CanvasRenderingContext2D_(this));
- }
-
- var slice = Array.prototype.slice;
-
- /**
- * Binds a function to an object. The returned function will always use the
- * passed in {@code obj} as {@code this}.
- *
- * Example:
- *
- * g = bind(f, obj, a, b)
- * g(c, d) // will do f.call(obj, a, b, c, d)
- *
- * @param {Function} f The function to bind the object to
- * @param {Object} obj The object that should act as this when the function
- * is called
- * @param {*} var_args Rest arguments that will be used as the initial
- * arguments when the function is called
- * @return {Function} A new function that has bound this
- */
- function bind(f, obj, var_args) {
- var a = slice.call(arguments, 2);
- return function() {
- return f.apply(obj, a.concat(slice.call(arguments)));
- };
- }
-
- var G_vmlCanvasManager_ = {
- init: function(opt_doc) {
- if (/MSIE/.test(navigator.userAgent) && !window.opera) {
- var doc = opt_doc || document;
- // Create a dummy element so that IE will allow canvas elements to be
- // recognized.
- doc.createElement('canvas');
- doc.attachEvent('onreadystatechange', bind(this.init_, this, doc));
- }
- },
-
- init_: function(doc) {
- // create xmlns
- if (!doc.namespaces['g_vml_']) {
- doc.namespaces.add('g_vml_', 'urn:schemas-microsoft-com:vml',
- '#default#VML');
-
- }
- if (!doc.namespaces['g_o_']) {
- doc.namespaces.add('g_o_', 'urn:schemas-microsoft-com:office:office',
- '#default#VML');
- }
-
- // Setup default CSS. Only add one style sheet per document
- if (!doc.styleSheets['ex_canvas_']) {
- var ss = doc.createStyleSheet();
- ss.owningElement.id = 'ex_canvas_';
- ss.cssText = 'canvas{display:inline-block;overflow:hidden;' +
- // default size is 300x150 in Gecko and Opera
- 'text-align:left;width:300px;height:150px}' +
- 'g_vml_\\:*{behavior:url(#default#VML)}' +
- 'g_o_\\:*{behavior:url(#default#VML)}';
-
- }
-
- // find all canvas elements
- var els = doc.getElementsByTagName('canvas');
- for (var i = 0; i < els.length; i++) {
- this.initElement(els[i]);
- }
- },
-
- /**
- * Public initializes a canvas element so that it can be used as canvas
- * element from now on. This is called automatically before the page is
- * loaded but if you are creating elements using createElement you need to
- * make sure this is called on the element.
- * @param {HTMLElement} el The canvas element to initialize.
- * @return {HTMLElement} the element that was created.
- */
- initElement: function(el) {
- if (!el.getContext) {
-
- el.getContext = getContext;
-
- // Remove fallback content. There is no way to hide text nodes so we
- // just remove all childNodes. We could hide all elements and remove
- // text nodes but who really cares about the fallback content.
- el.innerHTML = '';
-
- // do not use inline function because that will leak memory
- el.attachEvent('onpropertychange', onPropertyChange);
- el.attachEvent('onresize', onResize);
-
- var attrs = el.attributes;
- if (attrs.width && attrs.width.specified) {
- // TODO: use runtimeStyle and coordsize
- // el.getContext().setWidth_(attrs.width.nodeValue);
- el.style.width = attrs.width.nodeValue + 'px';
- } else {
- el.width = el.clientWidth;
- }
- if (attrs.height && attrs.height.specified) {
- // TODO: use runtimeStyle and coordsize
- // el.getContext().setHeight_(attrs.height.nodeValue);
- el.style.height = attrs.height.nodeValue + 'px';
- } else {
- el.height = el.clientHeight;
- }
- //el.getContext().setCoordsize_()
- }
- return el;
- }
- };
-
- function onPropertyChange(e) {
- var el = e.srcElement;
-
- switch (e.propertyName) {
- case 'width':
- el.style.width = el.attributes.width.nodeValue + 'px';
- el.getContext().clearRect();
- break;
- case 'height':
- el.style.height = el.attributes.height.nodeValue + 'px';
- el.getContext().clearRect();
- break;
- }
- }
-
- function onResize(e) {
- var el = e.srcElement;
- if (el.firstChild) {
- el.firstChild.style.width = el.clientWidth + 'px';
- el.firstChild.style.height = el.clientHeight + 'px';
- }
- }
-
- G_vmlCanvasManager_.init();
-
- // precompute "00" to "FF"
- var dec2hex = [];
- for (var i = 0; i < 16; i++) {
- for (var j = 0; j < 16; j++) {
- dec2hex[i * 16 + j] = i.toString(16) + j.toString(16);
- }
- }
-
- function createMatrixIdentity() {
- return [
- [1, 0, 0],
- [0, 1, 0],
- [0, 0, 1]
- ];
- }
-
- function matrixMultiply(m1, m2) {
- var result = createMatrixIdentity();
-
- for (var x = 0; x < 3; x++) {
- for (var y = 0; y < 3; y++) {
- var sum = 0;
-
- for (var z = 0; z < 3; z++) {
- sum += m1[x][z] * m2[z][y];
- }
-
- result[x][y] = sum;
- }
- }
- return result;
- }
-
- function copyState(o1, o2) {
- o2.fillStyle = o1.fillStyle;
- o2.lineCap = o1.lineCap;
- o2.lineJoin = o1.lineJoin;
- o2.lineWidth = o1.lineWidth;
- o2.miterLimit = o1.miterLimit;
- o2.shadowBlur = o1.shadowBlur;
- o2.shadowColor = o1.shadowColor;
- o2.shadowOffsetX = o1.shadowOffsetX;
- o2.shadowOffsetY = o1.shadowOffsetY;
- o2.strokeStyle = o1.strokeStyle;
- o2.globalAlpha = o1.globalAlpha;
- o2.arcScaleX_ = o1.arcScaleX_;
- o2.arcScaleY_ = o1.arcScaleY_;
- o2.lineScale_ = o1.lineScale_;
- }
-
- function processStyle(styleString) {
- var str, alpha = 1;
-
- styleString = String(styleString);
- if (styleString.substring(0, 3) == 'rgb') {
- var start = styleString.indexOf('(', 3);
- var end = styleString.indexOf(')', start + 1);
- var guts = styleString.substring(start + 1, end).split(',');
-
- str = '#';
- for (var i = 0; i < 3; i++) {
- str += dec2hex[Number(guts[i])];
- }
-
- if (guts.length == 4 && styleString.substr(3, 1) == 'a') {
- alpha = guts[3];
- }
- } else {
- str = styleString;
- }
-
- return {color: str, alpha: alpha};
- }
-
- function processLineCap(lineCap) {
- switch (lineCap) {
- case 'butt':
- return 'flat';
- case 'round':
- return 'round';
- case 'square':
- default:
- return 'square';
- }
- }
-
- /**
- * This class implements CanvasRenderingContext2D interface as described by
- * the WHATWG.
- * @param {HTMLElement} surfaceElement The element that the 2D context should
- * be associated with
- */
- function CanvasRenderingContext2D_(surfaceElement) {
- this.m_ = createMatrixIdentity();
-
- this.mStack_ = [];
- this.aStack_ = [];
- this.currentPath_ = [];
-
- // Canvas context properties
- this.strokeStyle = '#000';
- this.fillStyle = '#000';
-
- this.lineWidth = 1;
- this.lineJoin = 'miter';
- this.lineCap = 'butt';
- this.miterLimit = Z * 1;
- this.globalAlpha = 1;
- this.canvas = surfaceElement;
-
- var el = surfaceElement.ownerDocument.createElement('div');
- el.style.width = surfaceElement.clientWidth + 'px';
- el.style.height = surfaceElement.clientHeight + 'px';
- el.style.overflow = 'hidden';
- el.style.position = 'absolute';
- surfaceElement.appendChild(el);
-
- this.element_ = el;
- this.arcScaleX_ = 1;
- this.arcScaleY_ = 1;
- this.lineScale_ = 1;
- }
-
- var contextPrototype = CanvasRenderingContext2D_.prototype;
- contextPrototype.clearRect = function() {
- this.element_.innerHTML = '';
- };
-
- contextPrototype.beginPath = function() {
- // TODO: Branch current matrix so that save/restore has no effect
- // as per safari docs.
- this.currentPath_ = [];
- };
-
- contextPrototype.moveTo = function(aX, aY) {
- var p = this.getCoords_(aX, aY);
- this.currentPath_.push({type: 'moveTo', x: p.x, y: p.y});
- this.currentX_ = p.x;
- this.currentY_ = p.y;
- };
-
- contextPrototype.lineTo = function(aX, aY) {
- var p = this.getCoords_(aX, aY);
- this.currentPath_.push({type: 'lineTo', x: p.x, y: p.y});
-
- this.currentX_ = p.x;
- this.currentY_ = p.y;
- };
-
- contextPrototype.bezierCurveTo = function(aCP1x, aCP1y,
- aCP2x, aCP2y,
- aX, aY) {
- var p = this.getCoords_(aX, aY);
- var cp1 = this.getCoords_(aCP1x, aCP1y);
- var cp2 = this.getCoords_(aCP2x, aCP2y);
- bezierCurveTo(this, cp1, cp2, p);
- };
-
- // Helper function that takes the already fixed cordinates.
- function bezierCurveTo(self, cp1, cp2, p) {
- self.currentPath_.push({
- type: 'bezierCurveTo',
- cp1x: cp1.x,
- cp1y: cp1.y,
- cp2x: cp2.x,
- cp2y: cp2.y,
- x: p.x,
- y: p.y
- });
- self.currentX_ = p.x;
- self.currentY_ = p.y;
- }
-
- contextPrototype.quadraticCurveTo = function(aCPx, aCPy, aX, aY) {
- // the following is lifted almost directly from
- // http://developer.mozilla.org/en/docs/Canvas_tutorial:Drawing_shapes
-
- var cp = this.getCoords_(aCPx, aCPy);
- var p = this.getCoords_(aX, aY);
-
- var cp1 = {
- x: this.currentX_ + 2.0 / 3.0 * (cp.x - this.currentX_),
- y: this.currentY_ + 2.0 / 3.0 * (cp.y - this.currentY_)
- };
- var cp2 = {
- x: cp1.x + (p.x - this.currentX_) / 3.0,
- y: cp1.y + (p.y - this.currentY_) / 3.0
- };
-
- bezierCurveTo(this, cp1, cp2, p);
- };
-
- contextPrototype.arc = function(aX, aY, aRadius,
- aStartAngle, aEndAngle, aClockwise) {
- aRadius *= Z;
- var arcType = aClockwise ? 'at' : 'wa';
-
- var xStart = aX + mc(aStartAngle) * aRadius - Z2;
- var yStart = aY + ms(aStartAngle) * aRadius - Z2;
-
- var xEnd = aX + mc(aEndAngle) * aRadius - Z2;
- var yEnd = aY + ms(aEndAngle) * aRadius - Z2;
-
- // IE won't render arches drawn counter clockwise if xStart == xEnd.
- if (xStart == xEnd && !aClockwise) {
- xStart += 0.125; // Offset xStart by 1/80 of a pixel. Use something
- // that can be represented in binary
- }
-
- var p = this.getCoords_(aX, aY);
- var pStart = this.getCoords_(xStart, yStart);
- var pEnd = this.getCoords_(xEnd, yEnd);
-
- this.currentPath_.push({type: arcType,
- x: p.x,
- y: p.y,
- radius: aRadius,
- xStart: pStart.x,
- yStart: pStart.y,
- xEnd: pEnd.x,
- yEnd: pEnd.y});
-
- };
-
- contextPrototype.rect = function(aX, aY, aWidth, aHeight) {
- this.moveTo(aX, aY);
- this.lineTo(aX + aWidth, aY);
- this.lineTo(aX + aWidth, aY + aHeight);
- this.lineTo(aX, aY + aHeight);
- this.closePath();
- };
-
- contextPrototype.strokeRect = function(aX, aY, aWidth, aHeight) {
- var oldPath = this.currentPath_;
- this.beginPath();
-
- this.moveTo(aX, aY);
- this.lineTo(aX + aWidth, aY);
- this.lineTo(aX + aWidth, aY + aHeight);
- this.lineTo(aX, aY + aHeight);
- this.closePath();
- this.stroke();
-
- this.currentPath_ = oldPath;
- };
-
- contextPrototype.fillRect = function(aX, aY, aWidth, aHeight) {
- var oldPath = this.currentPath_;
- this.beginPath();
-
- this.moveTo(aX, aY);
- this.lineTo(aX + aWidth, aY);
- this.lineTo(aX + aWidth, aY + aHeight);
- this.lineTo(aX, aY + aHeight);
- this.closePath();
- this.fill();
-
- this.currentPath_ = oldPath;
- };
-
- contextPrototype.createLinearGradient = function(aX0, aY0, aX1, aY1) {
- var gradient = new CanvasGradient_('gradient');
- gradient.x0_ = aX0;
- gradient.y0_ = aY0;
- gradient.x1_ = aX1;
- gradient.y1_ = aY1;
- return gradient;
- };
-
- contextPrototype.createRadialGradient = function(aX0, aY0, aR0,
- aX1, aY1, aR1) {
- var gradient = new CanvasGradient_('gradientradial');
- gradient.x0_ = aX0;
- gradient.y0_ = aY0;
- gradient.r0_ = aR0;
- gradient.x1_ = aX1;
- gradient.y1_ = aY1;
- gradient.r1_ = aR1;
- return gradient;
- };
-
- contextPrototype.drawImage = function(image, var_args) {
- var dx, dy, dw, dh, sx, sy, sw, sh;
-
- // to find the original width we overide the width and height
- var oldRuntimeWidth = image.runtimeStyle.width;
- var oldRuntimeHeight = image.runtimeStyle.height;
- image.runtimeStyle.width = 'auto';
- image.runtimeStyle.height = 'auto';
-
- // get the original size
- var w = image.width;
- var h = image.height;
-
- // and remove overides
- image.runtimeStyle.width = oldRuntimeWidth;
- image.runtimeStyle.height = oldRuntimeHeight;
-
- if (arguments.length == 3) {
- dx = arguments[1];
- dy = arguments[2];
- sx = sy = 0;
- sw = dw = w;
- sh = dh = h;
- } else if (arguments.length == 5) {
- dx = arguments[1];
- dy = arguments[2];
- dw = arguments[3];
- dh = arguments[4];
- sx = sy = 0;
- sw = w;
- sh = h;
- } else if (arguments.length == 9) {
- sx = arguments[1];
- sy = arguments[2];
- sw = arguments[3];
- sh = arguments[4];
- dx = arguments[5];
- dy = arguments[6];
- dw = arguments[7];
- dh = arguments[8];
- } else {
- throw Error('Invalid number of arguments');
- }
-
- var d = this.getCoords_(dx, dy);
-
- var w2 = sw / 2;
- var h2 = sh / 2;
-
- var vmlStr = [];
-
- var W = 10;
- var H = 10;
-
- // For some reason that I've now forgotten, using divs didn't work
- vmlStr.push(' ' ,
- ' ',
- ' ');
-
- this.element_.insertAdjacentHTML('BeforeEnd',
- vmlStr.join(''));
- };
-
- contextPrototype.stroke = function(aFill) {
- var lineStr = [];
- var lineOpen = false;
- var a = processStyle(aFill ? this.fillStyle : this.strokeStyle);
- var color = a.color;
- var opacity = a.alpha * this.globalAlpha;
-
- var W = 10;
- var H = 10;
-
- lineStr.push('');
-
- if (!aFill) {
- var lineWidth = this.lineScale_ * this.lineWidth;
-
- // VML cannot correctly render a line if the width is less than 1px.
- // In that case, we dilute the color to make the line look thinner.
- if (lineWidth < 1) {
- opacity *= lineWidth;
- }
-
- lineStr.push(
- ' '
- );
- } else if (typeof this.fillStyle == 'object') {
- var fillStyle = this.fillStyle;
- var angle = 0;
- var focus = {x: 0, y: 0};
-
- // additional offset
- var shift = 0;
- // scale factor for offset
- var expansion = 1;
-
- if (fillStyle.type_ == 'gradient') {
- var x0 = fillStyle.x0_ / this.arcScaleX_;
- var y0 = fillStyle.y0_ / this.arcScaleY_;
- var x1 = fillStyle.x1_ / this.arcScaleX_;
- var y1 = fillStyle.y1_ / this.arcScaleY_;
- var p0 = this.getCoords_(x0, y0);
- var p1 = this.getCoords_(x1, y1);
- var dx = p1.x - p0.x;
- var dy = p1.y - p0.y;
- angle = Math.atan2(dx, dy) * 180 / Math.PI;
-
- // The angle should be a non-negative number.
- if (angle < 0) {
- angle += 360;
- }
-
- // Very small angles produce an unexpected result because they are
- // converted to a scientific notation string.
- if (angle < 1e-6) {
- angle = 0;
- }
- } else {
- var p0 = this.getCoords_(fillStyle.x0_, fillStyle.y0_);
- var width = max.x - min.x;
- var height = max.y - min.y;
- focus = {
- x: (p0.x - min.x) / width,
- y: (p0.y - min.y) / height
- };
-
- width /= this.arcScaleX_ * Z;
- height /= this.arcScaleY_ * Z;
- var dimension = m.max(width, height);
- shift = 2 * fillStyle.r0_ / dimension;
- expansion = 2 * fillStyle.r1_ / dimension - shift;
- }
-
- // We need to sort the color stops in ascending order by offset,
- // otherwise IE won't interpret it correctly.
- var stops = fillStyle.colors_;
- stops.sort(function(cs1, cs2) {
- return cs1.offset - cs2.offset;
- });
-
- var length = stops.length;
- var color1 = stops[0].color;
- var color2 = stops[length - 1].color;
- var opacity1 = stops[0].alpha * this.globalAlpha;
- var opacity2 = stops[length - 1].alpha * this.globalAlpha;
-
- var colors = [];
- for (var i = 0; i < length; i++) {
- var stop = stops[i];
- colors.push(stop.offset * expansion + shift + ' ' + stop.color);
- }
-
- // When colors attribute is used, the meanings of opacity and o:opacity2
- // are reversed.
- lineStr.push(' ');
- } else {
- lineStr.push(' ');
- }
-
- lineStr.push(' ');
-
- this.element_.insertAdjacentHTML('beforeEnd', lineStr.join(''));
- };
-
- contextPrototype.fill = function() {
- this.stroke(true);
- }
-
- contextPrototype.closePath = function() {
- this.currentPath_.push({type: 'close'});
- };
-
- /**
- * @private
- */
- contextPrototype.getCoords_ = function(aX, aY) {
- var m = this.m_;
- return {
- x: Z * (aX * m[0][0] + aY * m[1][0] + m[2][0]) - Z2,
- y: Z * (aX * m[0][1] + aY * m[1][1] + m[2][1]) - Z2
- }
- };
-
- contextPrototype.save = function() {
- var o = {};
- copyState(this, o);
- this.aStack_.push(o);
- this.mStack_.push(this.m_);
- this.m_ = matrixMultiply(createMatrixIdentity(), this.m_);
- };
-
- contextPrototype.restore = function() {
- copyState(this.aStack_.pop(), this);
- this.m_ = this.mStack_.pop();
- };
-
- function matrixIsFinite(m) {
- for (var j = 0; j < 3; j++) {
- for (var k = 0; k < 2; k++) {
- if (!isFinite(m[j][k]) || isNaN(m[j][k])) {
- return false;
- }
- }
- }
- return true;
- }
-
- function setM(ctx, m, updateLineScale) {
- if (!matrixIsFinite(m)) {
- return;
- }
- ctx.m_ = m;
-
- if (updateLineScale) {
- // Get the line scale.
- // Determinant of this.m_ means how much the area is enlarged by the
- // transformation. So its square root can be used as a scale factor
- // for width.
- var det = m[0][0] * m[1][1] - m[0][1] * m[1][0];
- ctx.lineScale_ = sqrt(abs(det));
- }
- }
-
- contextPrototype.translate = function(aX, aY) {
- var m1 = [
- [1, 0, 0],
- [0, 1, 0],
- [aX, aY, 1]
- ];
-
- setM(this, matrixMultiply(m1, this.m_), false);
- };
-
- contextPrototype.rotate = function(aRot) {
- var c = mc(aRot);
- var s = ms(aRot);
-
- var m1 = [
- [c, s, 0],
- [-s, c, 0],
- [0, 0, 1]
- ];
-
- setM(this, matrixMultiply(m1, this.m_), false);
- };
-
- contextPrototype.scale = function(aX, aY) {
- this.arcScaleX_ *= aX;
- this.arcScaleY_ *= aY;
- var m1 = [
- [aX, 0, 0],
- [0, aY, 0],
- [0, 0, 1]
- ];
-
- setM(this, matrixMultiply(m1, this.m_), true);
- };
-
- contextPrototype.transform = function(m11, m12, m21, m22, dx, dy) {
- var m1 = [
- [m11, m12, 0],
- [m21, m22, 0],
- [dx, dy, 1]
- ];
-
- setM(this, matrixMultiply(m1, this.m_), true);
- };
-
- contextPrototype.setTransform = function(m11, m12, m21, m22, dx, dy) {
- var m = [
- [m11, m12, 0],
- [m21, m22, 0],
- [dx, dy, 1]
- ];
-
- setM(this, m, true);
- };
-
- /******** STUBS ********/
- contextPrototype.clip = function() {
- // TODO: Implement
- };
-
- contextPrototype.arcTo = function() {
- // TODO: Implement
- };
-
- contextPrototype.createPattern = function() {
- return new CanvasPattern_;
- };
-
- // Gradient / Pattern Stubs
- function CanvasGradient_(aType) {
- this.type_ = aType;
- this.x0_ = 0;
- this.y0_ = 0;
- this.r0_ = 0;
- this.x1_ = 0;
- this.y1_ = 0;
- this.r1_ = 0;
- this.colors_ = [];
- }
-
- CanvasGradient_.prototype.addColorStop = function(aOffset, aColor) {
- aColor = processStyle(aColor);
- this.colors_.push({offset: aOffset,
- color: aColor.color,
- alpha: aColor.alpha});
- };
-
- function CanvasPattern_() {}
-
- // set up externs
- G_vmlCanvasManager = G_vmlCanvasManager_;
- CanvasRenderingContext2D = CanvasRenderingContext2D_;
- CanvasGradient = CanvasGradient_;
- CanvasPattern = CanvasPattern_;
-
-})();
-
-} // if
diff --git a/js_old/libs/html5shiv-printshiv.js b/js_old/libs/html5shiv-printshiv.js
deleted file mode 100644
index 61db9b5..0000000
--- a/js_old/libs/html5shiv-printshiv.js
+++ /dev/null
@@ -1,499 +0,0 @@
-/**
-* @preserve HTML5 Shiv v3.6.2 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
-*/
-;(function(window, document) {
-/*jshint evil:true */
- /** version */
- var version = '3.6.2';
-
- /** Preset options */
- var options = window.html5 || {};
-
- /** Used to skip problem elements */
- var reSkip = /^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i;
-
- /** Not all elements can be cloned in IE **/
- var saveClones = /^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i;
-
- /** Detect whether the browser supports default html5 styles */
- var supportsHtml5Styles;
-
- /** Name of the expando, to work with multiple documents or to re-shiv one document */
- var expando = '_html5shiv';
-
- /** The id for the the documents expando */
- var expanID = 0;
-
- /** Cached data for each document */
- var expandoData = {};
-
- /** Detect whether the browser supports unknown elements */
- var supportsUnknownElements;
-
- (function() {
- try {
- var a = document.createElement('a');
- a.innerHTML = ' ';
- //if the hidden property is implemented we can assume, that the browser supports basic HTML5 Styles
- supportsHtml5Styles = ('hidden' in a);
-
- supportsUnknownElements = a.childNodes.length == 1 || (function() {
- // assign a false positive if unable to shiv
- (document.createElement)('a');
- var frag = document.createDocumentFragment();
- return (
- typeof frag.cloneNode == 'undefined' ||
- typeof frag.createDocumentFragment == 'undefined' ||
- typeof frag.createElement == 'undefined'
- );
- }());
- } catch(e) {
- // assign a false positive if detection fails => unable to shiv
- supportsHtml5Styles = true;
- supportsUnknownElements = true;
- }
-
- }());
-
- /*--------------------------------------------------------------------------*/
-
- /**
- * Creates a style sheet with the given CSS text and adds it to the document.
- * @private
- * @param {Document} ownerDocument The document.
- * @param {String} cssText The CSS text.
- * @returns {StyleSheet} The style element.
- */
- function addStyleSheet(ownerDocument, cssText) {
- var p = ownerDocument.createElement('p'),
- parent = ownerDocument.getElementsByTagName('head')[0] || ownerDocument.documentElement;
-
- p.innerHTML = 'x';
- return parent.insertBefore(p.lastChild, parent.firstChild);
- }
-
- /**
- * Returns the value of `html5.elements` as an array.
- * @private
- * @returns {Array} An array of shived element node names.
- */
- function getElements() {
- var elements = html5.elements;
- return typeof elements == 'string' ? elements.split(' ') : elements;
- }
-
- /**
- * Returns the data associated to the given document
- * @private
- * @param {Document} ownerDocument The document.
- * @returns {Object} An object of data.
- */
- function getExpandoData(ownerDocument) {
- var data = expandoData[ownerDocument[expando]];
- if (!data) {
- data = {};
- expanID++;
- ownerDocument[expando] = expanID;
- expandoData[expanID] = data;
- }
- return data;
- }
-
- /**
- * returns a shived element for the given nodeName and document
- * @memberOf html5
- * @param {String} nodeName name of the element
- * @param {Document} ownerDocument The context document.
- * @returns {Object} The shived element.
- */
- function createElement(nodeName, ownerDocument, data){
- if (!ownerDocument) {
- ownerDocument = document;
- }
- if(supportsUnknownElements){
- return ownerDocument.createElement(nodeName);
- }
- if (!data) {
- data = getExpandoData(ownerDocument);
- }
- var node;
-
- if (data.cache[nodeName]) {
- node = data.cache[nodeName].cloneNode();
- } else if (saveClones.test(nodeName)) {
- node = (data.cache[nodeName] = data.createElem(nodeName)).cloneNode();
- } else {
- node = data.createElem(nodeName);
- }
-
- // Avoid adding some elements to fragments in IE < 9 because
- // * Attributes like `name` or `type` cannot be set/changed once an element
- // is inserted into a document/fragment
- // * Link elements with `src` attributes that are inaccessible, as with
- // a 403 response, will cause the tab/window to crash
- // * Script elements appended to fragments will execute when their `src`
- // or `text` property is set
- return node.canHaveChildren && !reSkip.test(nodeName) ? data.frag.appendChild(node) : node;
- }
-
- /**
- * returns a shived DocumentFragment for the given document
- * @memberOf html5
- * @param {Document} ownerDocument The context document.
- * @returns {Object} The shived DocumentFragment.
- */
- function createDocumentFragment(ownerDocument, data){
- if (!ownerDocument) {
- ownerDocument = document;
- }
- if(supportsUnknownElements){
- return ownerDocument.createDocumentFragment();
- }
- data = data || getExpandoData(ownerDocument);
- var clone = data.frag.cloneNode(),
- i = 0,
- elems = getElements(),
- l = elems.length;
- for(;i+~])(' + getElements().join('|') + ')(?=[[\\s,>+~#.:]|$)', 'gi'),
- replacement = '$1' + shivNamespace + '\\:$2';
-
- while (index--) {
- pair = parts[index] = parts[index].split('}');
- pair[pair.length - 1] = pair[pair.length - 1].replace(reElements, replacement);
- parts[index] = pair.join('}');
- }
- return parts.join('{');
- }
-
- /**
- * Removes the given wrappers, leaving the original elements.
- * @private
- * @params {Array} wrappers An array of printable wrappers.
- */
- function removeWrappers(wrappers) {
- var index = wrappers.length;
- while (index--) {
- wrappers[index].removeNode();
- }
- }
-
- /*--------------------------------------------------------------------------*/
-
- /**
- * Shivs the given document for print.
- * @memberOf html5
- * @param {Document} ownerDocument The document to shiv.
- * @returns {Document} The shived document.
- */
- function shivPrint(ownerDocument) {
- var shivedSheet,
- wrappers,
- data = getExpandoData(ownerDocument),
- namespaces = ownerDocument.namespaces,
- ownerWindow = ownerDocument.parentWindow;
-
- if (!supportsShivableSheets || ownerDocument.printShived) {
- return ownerDocument;
- }
- if (typeof namespaces[shivNamespace] == 'undefined') {
- namespaces.add(shivNamespace);
- }
-
- function removeSheet() {
- clearTimeout(data._removeSheetTimer);
- if (shivedSheet) {
- shivedSheet.removeNode(true);
- }
- shivedSheet= null;
- }
-
- ownerWindow.attachEvent('onbeforeprint', function() {
-
- removeSheet();
-
- var imports,
- length,
- sheet,
- collection = ownerDocument.styleSheets,
- cssText = [],
- index = collection.length,
- sheets = Array(index);
-
- // convert styleSheets collection to an array
- while (index--) {
- sheets[index] = collection[index];
- }
- // concat all style sheet CSS text
- while ((sheet = sheets.pop())) {
- // IE does not enforce a same origin policy for external style sheets...
- // but has trouble with some dynamically created stylesheets
- if (!sheet.disabled && reMedia.test(sheet.media)) {
-
- try {
- imports = sheet.imports;
- length = imports.length;
- } catch(er){
- length = 0;
- }
-
- for (index = 0; index < length; index++) {
- sheets.push(imports[index]);
- }
-
- try {
- cssText.push(sheet.cssText);
- } catch(er){}
- }
- }
-
- // wrap all HTML5 elements with printable elements and add the shived style sheet
- cssText = shivCssText(cssText.reverse().join(''));
- wrappers = addWrappers(ownerDocument);
- shivedSheet = addStyleSheet(ownerDocument, cssText);
-
- });
-
- ownerWindow.attachEvent('onafterprint', function() {
- // remove wrappers, leaving the original elements, and remove the shived style sheet
- removeWrappers(wrappers);
- clearTimeout(data._removeSheetTimer);
- data._removeSheetTimer = setTimeout(removeSheet, 500);
- });
-
- ownerDocument.printShived = true;
- return ownerDocument;
- }
-
- /*--------------------------------------------------------------------------*/
-
- // expose API
- html5.type += ' print';
- html5.shivPrint = shivPrint;
-
- // shiv for print
- shivPrint(document);
-
-}(this, document));
diff --git a/js_old/libs/html5shiv.js b/js_old/libs/html5shiv.js
deleted file mode 100644
index 803f141..0000000
--- a/js_old/libs/html5shiv.js
+++ /dev/null
@@ -1,301 +0,0 @@
-/**
-* @preserve HTML5 Shiv v3.6.2 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
-*/
-;(function(window, document) {
-/*jshint evil:true */
- /** version */
- var version = '3.6.2';
-
- /** Preset options */
- var options = window.html5 || {};
-
- /** Used to skip problem elements */
- var reSkip = /^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i;
-
- /** Not all elements can be cloned in IE **/
- var saveClones = /^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i;
-
- /** Detect whether the browser supports default html5 styles */
- var supportsHtml5Styles;
-
- /** Name of the expando, to work with multiple documents or to re-shiv one document */
- var expando = '_html5shiv';
-
- /** The id for the the documents expando */
- var expanID = 0;
-
- /** Cached data for each document */
- var expandoData = {};
-
- /** Detect whether the browser supports unknown elements */
- var supportsUnknownElements;
-
- (function() {
- try {
- var a = document.createElement('a');
- a.innerHTML = ' ';
- //if the hidden property is implemented we can assume, that the browser supports basic HTML5 Styles
- supportsHtml5Styles = ('hidden' in a);
-
- supportsUnknownElements = a.childNodes.length == 1 || (function() {
- // assign a false positive if unable to shiv
- (document.createElement)('a');
- var frag = document.createDocumentFragment();
- return (
- typeof frag.cloneNode == 'undefined' ||
- typeof frag.createDocumentFragment == 'undefined' ||
- typeof frag.createElement == 'undefined'
- );
- }());
- } catch(e) {
- // assign a false positive if detection fails => unable to shiv
- supportsHtml5Styles = true;
- supportsUnknownElements = true;
- }
-
- }());
-
- /*--------------------------------------------------------------------------*/
-
- /**
- * Creates a style sheet with the given CSS text and adds it to the document.
- * @private
- * @param {Document} ownerDocument The document.
- * @param {String} cssText The CSS text.
- * @returns {StyleSheet} The style element.
- */
- function addStyleSheet(ownerDocument, cssText) {
- var p = ownerDocument.createElement('p'),
- parent = ownerDocument.getElementsByTagName('head')[0] || ownerDocument.documentElement;
-
- p.innerHTML = 'x';
- return parent.insertBefore(p.lastChild, parent.firstChild);
- }
-
- /**
- * Returns the value of `html5.elements` as an array.
- * @private
- * @returns {Array} An array of shived element node names.
- */
- function getElements() {
- var elements = html5.elements;
- return typeof elements == 'string' ? elements.split(' ') : elements;
- }
-
- /**
- * Returns the data associated to the given document
- * @private
- * @param {Document} ownerDocument The document.
- * @returns {Object} An object of data.
- */
- function getExpandoData(ownerDocument) {
- var data = expandoData[ownerDocument[expando]];
- if (!data) {
- data = {};
- expanID++;
- ownerDocument[expando] = expanID;
- expandoData[expanID] = data;
- }
- return data;
- }
-
- /**
- * returns a shived element for the given nodeName and document
- * @memberOf html5
- * @param {String} nodeName name of the element
- * @param {Document} ownerDocument The context document.
- * @returns {Object} The shived element.
- */
- function createElement(nodeName, ownerDocument, data){
- if (!ownerDocument) {
- ownerDocument = document;
- }
- if(supportsUnknownElements){
- return ownerDocument.createElement(nodeName);
- }
- if (!data) {
- data = getExpandoData(ownerDocument);
- }
- var node;
-
- if (data.cache[nodeName]) {
- node = data.cache[nodeName].cloneNode();
- } else if (saveClones.test(nodeName)) {
- node = (data.cache[nodeName] = data.createElem(nodeName)).cloneNode();
- } else {
- node = data.createElem(nodeName);
- }
-
- // Avoid adding some elements to fragments in IE < 9 because
- // * Attributes like `name` or `type` cannot be set/changed once an element
- // is inserted into a document/fragment
- // * Link elements with `src` attributes that are inaccessible, as with
- // a 403 response, will cause the tab/window to crash
- // * Script elements appended to fragments will execute when their `src`
- // or `text` property is set
- return node.canHaveChildren && !reSkip.test(nodeName) ? data.frag.appendChild(node) : node;
- }
-
- /**
- * returns a shived DocumentFragment for the given document
- * @memberOf html5
- * @param {Document} ownerDocument The context document.
- * @returns {Object} The shived DocumentFragment.
- */
- function createDocumentFragment(ownerDocument, data){
- if (!ownerDocument) {
- ownerDocument = document;
- }
- if(supportsUnknownElements){
- return ownerDocument.createDocumentFragment();
- }
- data = data || getExpandoData(ownerDocument);
- var clone = data.frag.cloneNode(),
- i = 0,
- elems = getElements(),
- l = elems.length;
- for(;i this.totalLegs - 1) {
- return this.stop();
- }
- return this.showLeg();
- };
-
- Bus.prototype.prev = function(cb) {
- this.hideLeg();
- this.currentLegIndex--;
- if (this.currentLegIndex < 0) {
- return this.stop();
- }
- return this.showLeg();
- };
-
- Bus.prototype.destroy = function() {
- if (this.legs) {
- $.each(this.legs, function() {
- return this.destroy();
- });
- }
- this.legs = null;
- delete _busses[this.id];
- return this._teardownEvents();
- };
-
- Bus.prototype._buildLegs = function() {
- var _this = this;
- if (this.legs) {
- $.each(this.legs, function(_, leg) {
- return leg.destroy();
- });
- }
- return $.map(this.legEls, function(legEl, i) {
- var $legEl, data, leg;
- $legEl = $(legEl);
- data = $legEl.data();
- leg = new Leg({
- content: $legEl.html(),
- target: data.el || 'body',
- bus: _this,
- index: i,
- rawData: data
- });
- leg.render();
- _this.$target.append(leg.$el);
- leg._position();
- leg.hide();
- return leg;
- });
- };
-
- Bus.prototype._log = function() {
- if (!this.options.debug) {
- return;
- }
- return console.log.apply(console, ["TOURBUS " + this.id + ":"].concat(__slice.call(arguments)));
- };
-
- Bus.prototype._setupEvents = function() {
- this.$el.on('depart.tourbus', $.proxy(this.depart, this));
- this.$el.on('stop.tourbus', $.proxy(this.stop, this));
- this.$el.on('next.tourbus', $.proxy(this.next, this));
- return this.$el.on('prev.tourbus', $.proxy(this.prev, this));
- };
-
- Bus.prototype._teardownEvents = function() {
- return this.$el.off('.tourbus');
- };
-
- return Bus;
-
- })();
- Leg = (function() {
-
- function Leg(options) {
- this.bus = options.bus;
- this.rawData = options.rawData;
- this.content = options.content;
- this.index = options.index;
- this.options = options;
- this.$target = $(options.target);
- if (this.$target.length === 0) {
- throw "" + this.$target.selector + " is not an element!";
- }
- this._setupOptions();
- this._configureElement();
- this._configureTarget();
- this._configureScroll();
- this._setupEvents();
- this.bus._log("leg " + this.index + " made with options", this.options);
- }
-
- Leg.prototype.render = function() {
- var arrowClass, html;
- arrowClass = this.options.orientation === 'centered' ? '' : 'tourbus-arrow';
- this.$el.addClass(" " + arrowClass + " tourbus-arrow-" + this.options.orientation + " ");
- html = "\n " + this.content + "\n
";
- this.$el.css({
- width: this.options.width
- }).html(html);
- return this;
- };
-
- Leg.prototype.destroy = function() {
- this.$el.remove();
- return this._teardownEvents();
- };
-
- Leg.prototype.reposition = function() {
- this._configureTarget();
- return this._position();
- };
-
- Leg.prototype._position = function() {
- var css, keys, rule, selector;
- if (this.options.orientation !== 'centered') {
- rule = {};
- keys = {
- top: 'left',
- bottom: 'left',
- left: 'top',
- right: 'top'
- };
- if (typeof this.options.arrow === 'number') {
- this.options.arrow += 'px';
- }
- rule[keys[this.options.orientation]] = this.options.arrow;
- selector = "#" + this.id + ".tourbus-arrow";
- this.bus._log("adding rule for " + this.id, rule);
- _addRule("" + selector + ":before, " + selector + ":after", rule);
- }
- css = this._offsets();
- this.bus._log('setting offsets on leg', css);
- return this.$el.css(css);
- };
-
- Leg.prototype.show = function() {
- this.$el.css({
- visibility: 'visible',
- opacity: 1.0,
- zIndex: 9999
- });
- return this.scrollIntoView();
- };
-
- Leg.prototype.hide = function() {
- if (this.bus.options.debug) {
- return this.$el.css({
- visibility: 'visible',
- opacity: 0.4,
- zIndex: 0
- });
- } else {
- return this.$el.css({
- visibility: 'hidden'
- });
- }
- };
-
- Leg.prototype.scrollIntoView = function() {
- var scrollTarget;
- if (!this.willScroll) {
- return;
- }
- scrollTarget = _dataProp(this.options.scrollTo, this.$el);
- this.bus._log('scrolling to', scrollTarget, this.scrollSettings);
- return $.scrollTo(scrollTarget, this.scrollSettings);
- };
-
- Leg.prototype._setupOptions = function() {
- var globalOptions;
- globalOptions = this.bus.options.leg;
- this.options.top = _dataProp(this.rawData.top, globalOptions.top);
- this.options.left = _dataProp(this.rawData.left, globalOptions.left);
- this.options.scrollTo = _dataProp(this.rawData.scrollTo, globalOptions.scrollTo);
- this.options.scrollSpeed = _dataProp(this.rawData.scrollSpeed, globalOptions.scrollSpeed);
- this.options.scrollContext = _dataProp(this.rawData.scrollContext, globalOptions.scrollContext);
- this.options.margin = _dataProp(this.rawData.margin, globalOptions.margin);
- this.options.arrow = this.rawData.arrow || globalOptions.arrow;
- this.options.align = this.rawData.align || globalOptions.align;
- this.options.width = this.rawData.width || globalOptions.width;
- return this.options.orientation = this.rawData.orientation || globalOptions.orientation;
- };
-
- Leg.prototype._configureElement = function() {
- this.id = "tourbus-leg-id-" + this.bus.id + "-" + this.options.index;
- this.$el = $("
");
- this.el = this.$el[0];
- this.$el.attr({
- id: this.id
- });
- return this.$el.css({
- zIndex: 9999
- });
- };
-
- Leg.prototype._setupEvents = function() {
- this.$el.on('click', '.tourbus-next', $.proxy(this.bus.next, this.bus));
- this.$el.on('click', '.tourbus-prev', $.proxy(this.bus.prev, this.bus));
- return this.$el.on('click', '.tourbus-stop', $.proxy(this.bus.stop, this.bus));
- };
-
- Leg.prototype._teardownEvents = function() {
- return this.$el.off('click');
- };
-
- Leg.prototype._configureTarget = function() {
- this.targetOffset = this.$target.offset();
- if (_dataProp(this.options.top, false)) {
- this.targetOffset.top = this.options.top;
- }
- if (_dataProp(this.options.left, false)) {
- this.targetOffset.left = this.options.left;
- }
- this.targetWidth = this.$target.outerWidth();
- return this.targetHeight = this.$target.outerHeight();
- };
-
- Leg.prototype._configureScroll = function() {
- this.willScroll = $.fn.scrollTo && this.options.scrollTo !== false;
- return this.scrollSettings = {
- offset: -this.options.scrollContext,
- easing: 'linear',
- axis: 'y',
- duration: this.options.scrollSpeed
- };
- };
-
- Leg.prototype._offsets = function() {
- var dimension, elHalf, elHeight, elWidth, offsets, targetHalf, targetHeightOverride, validOrientations;
- elHeight = this.$el.height();
- elWidth = this.$el.width();
- offsets = {};
- switch (this.options.orientation) {
- case 'centered':
- targetHeightOverride = $(window).height();
- offsets.top = this.options.top;
- if (!_dataProp(offsets.top, false)) {
- offsets.top = (targetHeightOverride / 2) - (elHeight / 2);
- }
- offsets.left = (this.targetWidth / 2) - (elWidth / 2);
- break;
- case 'left':
- offsets.top = this.targetOffset.top;
- offsets.left = this.targetOffset.left - elWidth - this.options.margin;
- break;
- case 'right':
- offsets.top = this.targetOffset.top;
- offsets.left = this.targetOffset.left + this.targetWidth + this.options.margin;
- break;
- case 'top':
- offsets.top = this.targetOffset.top - elHeight - this.options.margin;
- offsets.left = this.targetOffset.left;
- break;
- case 'bottom':
- offsets.top = this.targetOffset.top + this.targetHeight + this.options.margin;
- offsets.left = this.targetOffset.left;
- }
- validOrientations = {
- top: ['left', 'right'],
- bottom: ['left', 'right'],
- left: ['top', 'bottom'],
- right: ['top', 'bottom']
- };
- if (_include(this.options.orientation, validOrientations[this.options.align])) {
- switch (this.options.align) {
- case 'right':
- offsets.left += this.targetWidth - elWidth;
- break;
- case 'bottom':
- offsets.top += this.targetHeight - elHeight;
- }
- } else if (this.options.align === 'center') {
- if (_include(this.options.orientation, validOrientations.left)) {
- targetHalf = this.targetWidth / 2;
- elHalf = elWidth / 2;
- dimension = 'left';
- } else {
- targetHalf = this.targetHeight / 2;
- elHalf = elHeight / 2;
- dimension = 'top';
- }
- if (targetHalf > elHalf) {
- offsets[dimension] += targetHalf - elHalf;
- } else {
- offsets[dimension] -= elHalf - targetHalf;
- }
- }
- return offsets;
- };
-
- return Leg;
-
- })();
- _tours = 0;
- uniqueId = function() {
- return _tours++;
- };
- _busses = {};
- _assemble = function() {
- var bus;
- bus = (function(func, args, ctor) {
- ctor.prototype = func.prototype;
- var child = new ctor, result = func.apply(child, args);
- return Object(result) === result ? result : child;
- })(Bus, arguments, function(){});
- _busses[bus.id] = bus;
- return bus;
- };
- _dataProp = function(possiblyFalsy, alternative) {
- if (possiblyFalsy === null || typeof possiblyFalsy === 'undefined') {
- return alternative;
- }
- return possiblyFalsy;
- };
- _include = function(value, array) {
- return $.inArray(value, array || []) !== -1;
- };
- return _addRule = (function(styleTag) {
- var sheet;
- styleTag.type = 'text/css';
- document.getElementsByTagName('head')[0].appendChild(styleTag);
- sheet = document.styleSheets[document.styleSheets.length - 1];
- return function(selector, css) {
- var key, propText;
- propText = $.map((function() {
- var _results;
- _results = [];
- for (key in css) {
- _results.push(key);
- }
- return _results;
- })(), function(p) {
- return "" + p + ":" + css[p];
- }).join(';');
- try {
- if (sheet.insertRule) {
- sheet.insertRule("" + selector + " { " + propText + " }", (sheet.cssRules || sheet.rules).length);
- } else {
- sheet.addRule(selector, propText);
- }
- } catch (_error) {}
- };
- })(document.createElement('style'));
- })(jQuery);
-
-}).call(this);
diff --git a/js_old/libs/jquery-tourbus.min.js b/js_old/libs/jquery-tourbus.min.js
deleted file mode 100644
index 19a22a9..0000000
--- a/js_old/libs/jquery-tourbus.min.js
+++ /dev/null
@@ -1 +0,0 @@
-(function(){var a=[].slice;!function(b){var c,d,e,f,g,h,i,j,k,l,m;return f=b.tourbus=function(){var c,d;return c=1<=arguments.length?a.call(arguments,0):[],d=c[0],e.hasOwnProperty(d)?c=c.slice(1):d instanceof b?d="build":"string"==typeof d?(d="build",c[0]=b(c[0])):b.error("Unknown method of $.tourbus --",c),e[d].apply(this,c)},b.fn.tourbus=function(){var c;return c=1<=arguments.length?a.call(arguments,0):[],this.each(function(){return c.unshift(b(this)),f.apply(null,["build"].concat(a.call(c))),this})},e={build:function(a,c){var d;return null==c&&(c={}),c=b.extend(!0,{},f.defaults,c),d=[],a instanceof b||(a=b(a)),a.each(function(){return d.push(i(this,c))}),0===d.length&&b.error(""+a.selector+" was not found!"),1===d.length?d[0]:d},destroyAll:function(){var a,b,c;c=[];for(b in j)a=j[b],c.push(a.destroy());return c},expose:function(a){return a.tourbus={Bus:c,Leg:d}}},f.defaults={debug:!1,autoDepart:!1,target:"body",startAt:0,onDepart:function(){return null},onStop:function(){return null},onLegStart:function(){return null},onLegEnd:function(){return null},leg:{scrollTo:null,scrollSpeed:150,scrollContext:100,orientation:"bottom",align:"left",width:"auto",margin:10,top:null,left:null,arrow:"35%"}},c=function(){function c(a,c){this.id=g(),this.$target=b(c.target),this.$el=b(a),this.$el.data({tourbus:this}),this.options=c,this.currentLegIndex=null,this.legs=null,this.legEls=this.$el.children("li"),this.totalLegs=this.legEls.length,this._setupEvents(),this.options.autoDepart&&this.$el.trigger("depart.tourbus"),this._log("built tourbus with el",a.toString(),"and options",this.options)}return c.prototype.depart=function(){return this.running=!0,this.options.onDepart(this),this._log("departing",this),this.legs=this._buildLegs(),this.currentLegIndex=this.options.startAt,this.showLeg()},c.prototype.stop=function(){return this.running?(this.legs&&b.each(this.legs,b.proxy(this.hideLeg,this)),this.currentLegIndex=this.options.startAt,this.options.onStop(this),this.running=!1):void 0},c.prototype.on=function(a,b,c){return this.$target.on(a,b,c)},c.prototype.currentLeg=function(){return null===this.currentLegIndex?null:this.legs[this.currentLegIndex]},c.prototype.showLeg=function(a){var b,c;return null==a&&(a=this.currentLegIndex),b=this.legs[a],this._log("showLeg:",b),c=this.options.onLegStart(b,this),c!==!1?b.show():void 0},c.prototype.hideLeg=function(a){var b,c;return null==a&&(a=this.currentLegIndex),b=this.legs[a],this._log("hideLeg:",b),c=this.options.onLegEnd(b,this),c!==!1?b.hide():void 0},c.prototype.repositionLegs=function(){return this.legs?b.each(this.legs,function(){return this.reposition()}):void 0},c.prototype.next=function(){return this.hideLeg(),this.currentLegIndex++,this.currentLegIndex>this.totalLegs-1?this.stop():this.showLeg()},c.prototype.prev=function(){return this.hideLeg(),this.currentLegIndex--,this.currentLegIndex<0?this.stop():this.showLeg()},c.prototype.destroy=function(){return this.legs&&b.each(this.legs,function(){return this.destroy()}),this.legs=null,delete j[this.id],this._teardownEvents()},c.prototype._buildLegs=function(){var a=this;return this.legs&&b.each(this.legs,function(a,b){return b.destroy()}),b.map(this.legEls,function(c,e){var f,g,h;return f=b(c),g=f.data(),h=new d({content:f.html(),target:g.el||"body",bus:a,index:e,rawData:g}),h.render(),a.$target.append(h.$el),h._position(),h.hide(),h})},c.prototype._log=function(){return this.options.debug?console.log.apply(console,["TOURBUS "+this.id+":"].concat(a.call(arguments))):void 0},c.prototype._setupEvents=function(){return this.$el.on("depart.tourbus",b.proxy(this.depart,this)),this.$el.on("stop.tourbus",b.proxy(this.stop,this)),this.$el.on("next.tourbus",b.proxy(this.next,this)),this.$el.on("prev.tourbus",b.proxy(this.prev,this))},c.prototype._teardownEvents=function(){return this.$el.off(".tourbus")},c}(),d=function(){function a(a){if(this.bus=a.bus,this.rawData=a.rawData,this.content=a.content,this.index=a.index,this.options=a,this.$target=b(a.target),0===this.$target.length)throw""+this.$target.selector+" is not an element!";this._setupOptions(),this._configureElement(),this._configureTarget(),this._configureScroll(),this._setupEvents(),this.bus._log("leg "+this.index+" made with options",this.options)}return a.prototype.render=function(){var a,b;return a="centered"===this.options.orientation?"":"tourbus-arrow",this.$el.addClass(" "+a+" tourbus-arrow-"+this.options.orientation+" "),b="\n "+this.content+"\n
",this.$el.css({width:this.options.width}).html(b),this},a.prototype.destroy=function(){return this.$el.remove(),this._teardownEvents()},a.prototype.reposition=function(){return this._configureTarget(),this._position()},a.prototype._position=function(){var a,b,c,d;return"centered"!==this.options.orientation&&(c={},b={top:"left",bottom:"left",left:"top",right:"top"},"number"==typeof this.options.arrow&&(this.options.arrow+="px"),c[b[this.options.orientation]]=this.options.arrow,d="#"+this.id+".tourbus-arrow",this.bus._log("adding rule for "+this.id,c),h(""+d+":before, "+d+":after",c)),a=this._offsets(),this.bus._log("setting offsets on leg",a),this.$el.css(a)},a.prototype.show=function(){return this.$el.css({visibility:"visible",opacity:1,zIndex:9999}),this.scrollIntoView()},a.prototype.hide=function(){return this.bus.options.debug?this.$el.css({visibility:"visible",opacity:.4,zIndex:0}):this.$el.css({visibility:"hidden"})},a.prototype.scrollIntoView=function(){var a;if(this.willScroll)return a=k(this.options.scrollTo,this.$el),this.bus._log("scrolling to",a,this.scrollSettings),b.scrollTo(a,this.scrollSettings)},a.prototype._setupOptions=function(){var a;return a=this.bus.options.leg,this.options.top=k(this.rawData.top,a.top),this.options.left=k(this.rawData.left,a.left),this.options.scrollTo=k(this.rawData.scrollTo,a.scrollTo),this.options.scrollSpeed=k(this.rawData.scrollSpeed,a.scrollSpeed),this.options.scrollContext=k(this.rawData.scrollContext,a.scrollContext),this.options.margin=k(this.rawData.margin,a.margin),this.options.arrow=this.rawData.arrow||a.arrow,this.options.align=this.rawData.align||a.align,this.options.width=this.rawData.width||a.width,this.options.orientation=this.rawData.orientation||a.orientation},a.prototype._configureElement=function(){return this.id="tourbus-leg-id-"+this.bus.id+"-"+this.options.index,this.$el=b("
"),this.el=this.$el[0],this.$el.attr({id:this.id}),this.$el.css({zIndex:9999})},a.prototype._setupEvents=function(){return this.$el.on("click",".tourbus-next",b.proxy(this.bus.next,this.bus)),this.$el.on("click",".tourbus-prev",b.proxy(this.bus.prev,this.bus)),this.$el.on("click",".tourbus-stop",b.proxy(this.bus.stop,this.bus))},a.prototype._teardownEvents=function(){return this.$el.off("click")},a.prototype._configureTarget=function(){return this.targetOffset=this.$target.offset(),k(this.options.top,!1)&&(this.targetOffset.top=this.options.top),k(this.options.left,!1)&&(this.targetOffset.left=this.options.left),this.targetWidth=this.$target.outerWidth(),this.targetHeight=this.$target.outerHeight()},a.prototype._configureScroll=function(){return this.willScroll=b.fn.scrollTo&&this.options.scrollTo!==!1,this.scrollSettings={offset:-this.options.scrollContext,easing:"linear",axis:"y",duration:this.options.scrollSpeed}},a.prototype._offsets=function(){var a,c,d,e,f,g,h,i;switch(d=this.$el.height(),e=this.$el.width(),f={},this.options.orientation){case"centered":h=b(window).height(),f.top=this.options.top,k(f.top,!1)||(f.top=h/2-d/2),f.left=this.targetWidth/2-e/2;break;case"left":f.top=this.targetOffset.top,f.left=this.targetOffset.left-e-this.options.margin;break;case"right":f.top=this.targetOffset.top,f.left=this.targetOffset.left+this.targetWidth+this.options.margin;break;case"top":f.top=this.targetOffset.top-d-this.options.margin,f.left=this.targetOffset.left;break;case"bottom":f.top=this.targetOffset.top+this.targetHeight+this.options.margin,f.left=this.targetOffset.left}if(i={top:["left","right"],bottom:["left","right"],left:["top","bottom"],right:["top","bottom"]},l(this.options.orientation,i[this.options.align]))switch(this.options.align){case"right":f.left+=this.targetWidth-e;break;case"bottom":f.top+=this.targetHeight-d}else"center"===this.options.align&&(l(this.options.orientation,i.left)?(g=this.targetWidth/2,c=e/2,a="left"):(g=this.targetHeight/2,c=d/2,a="top"),g>c?f[a]+=g-c:f[a]-=c-g);return f},a}(),m=0,g=function(){return m++},j={},i=function(){var a;return a=function(a,b,c){c.prototype=a.prototype;var d=new c,e=a.apply(d,b);return Object(e)===e?e:d}(c,arguments,function(){}),j[a.id]=a,a},k=function(a,b){return null===a||"undefined"==typeof a?b:a},l=function(a,c){return-1!==b.inArray(a,c||[])},h=function(a){var c;return a.type="text/css",document.getElementsByTagName("head")[0].appendChild(a),c=document.styleSheets[document.styleSheets.length-1],function(a,d){var e,f;f=b.map(function(){var a;a=[];for(e in d)a.push(e);return a}(),function(a){return""+a+":"+d[a]}).join(";");try{c.insertRule?c.insertRule(""+a+" { "+f+" }",(c.cssRules||c.rules).length):c.addRule(a,f)}catch(g){}}}(document.createElement("style"))}(jQuery)}).call(this);
\ No newline at end of file
diff --git a/js_old/main.js.orig b/js_old/main.js.orig
deleted file mode 100644
index f74b219..0000000
--- a/js_old/main.js.orig
+++ /dev/null
@@ -1,139 +0,0 @@
-var debugMode = false; // debug mode
-var sendPrintCommands = true; // if Doodle3d should send print commands to the 3d printer
-var communicateWithWifibox = true; // if Doodle3d should try interfacing with the wifibox (in case one is not connected)
-var wifiboxIsRemote = false; // when you want to run the client on a computer and have it remotely connect to the wifibox
-var autoUpdate = true; // auto retrieve updates about temperature and progress from printer
-
-var printer = new Printer();
-var progressbar = new Progressbar();
-var thermometer = new Thermometer();
-var settingsWindow = new SettingsWindow();
-var message = new Message();
-
-var firstTimeSettingsLoaded = true;
-
-var wifiboxURL; // Using the uhttpd lua handler as default, because of better performance
-var wifiboxCGIBinURL; // CGI-bin, for some network stuff, where it needs to restart the webserver for example
-
-var $drawAreaContainer, $doodleCanvas, doodleCanvas, doodleCanvasContext, $previewContainer;
-
-$(function() {
- console.log("ready");
-
-
- //TODO give this a more logical place in code
-
- if (getURLParameter("d") != "null") debugMode = (getURLParameter("d") == "1");
- if (getURLParameter("p") != "null") sendPrintCommands = (getURLParameter("p") == "1");
- if (getURLParameter("c") != "null") communicateWithWifibox = (getURLParameter("c") == "1");
- if (getURLParameter("r") != "null") wifiboxIsRemote = (getURLParameter("r") == "1");
- if (getURLParameter("u") != "null") autoUpdate = (getURLParameter("u") == "1");
-
- if (wifiboxIsRemote) {
- wifiboxURL = "http://192.168.5.1/d3dapi";
- wifiboxCGIBinURL = "http://192.168.5.1/cgi-bin/d3dapi";
- } else {
- wifiboxURL = "http://" + window.location.host + "/d3dapi";
- wifiboxCGIBinURL = "http://" + window.location.host + "/cgi-bin/d3dapi";
- }
-
- if (!communicateWithWifibox) {
- sendPrintCommands = false; // 'communicateWithWifibox = false' implies this
- }
- console.log("debugMode: " + debugMode);
- console.log("sendPrintCommands: " + sendPrintCommands);
- console.log("communicateWithWifibox: " + communicateWithWifibox);
- console.log("wifiboxIsRemote: " + wifiboxIsRemote);
- console.log("wifibox URL: " + wifiboxURL);
-
- initDoodleDrawing();
- initPreviewRendering();
- initLayouting();
- initSidebars();
- initButtonBehavior();
- initVerticalShapes();
-
- thermometer.init($("#thermometerCanvas"), $("#thermometerContainer"));
- progressbar.init($("#progressbarCanvas"), $("#progressbarCanvasContainer"));
-
- message.init($("#message"));
-
- printer.init();
- $(document).on(Printer.UPDATE,update);
-
- settingsWindow.init(wifiboxURL,wifiboxCGIBinURL);
- $(document).on(SettingsWindow.SETTINGS_LOADED, settingsLoaded);
-
- if(debugMode) {
- console.log("debug mode is true");
- $("body").css("overflow", "auto");
- $("#debug_textArea").css("display", "block");
- $("#preview_tmp").css("display", "block");
-
- $("#debug_display").css("display", "block");
-
- // show and hide the progressguage and thermometer
- showhideInterval = setInterval(showOrHideThermo, 2500);
-
-// $("#debugContainer").css("display", "block");
-
- /* TEMP CODE!! -> artificially populates the startgcode and endgcode textareas in the settings window */
- // todo remove this temporary code...
- /*
- setTimeout(function() {
- $("#startgcode").text("");
- $("#startgcode").append("G21 (mm) \n");
- $("#startgcode").append("G91 (relative) \n");
- $("#startgcode").append("G28 X0 Y0 Z0 (physical home) \n");
- $("#startgcode").append("M104 S230 (temperature) \n");
- $("#startgcode").append("G1 E10 F250 (flow) \n");
- $("#startgcode").append("G92 X-100 Y-100 Z0 E10 \n");
- $("#startgcode").append("G1 Z3 F5000 (prevent diagonal line) \n");
- $("#startgcode").append("G90 (absolute) \n");
- $("#startgcode").append("M106 (fan on)");
- console.log("$('#startgcode'): " + $("#startgcode").val());
-
- $("#endgcode").text("");
- $("#endgcode").append("G1 X-100 Y-100 F15000 (fast homing) \n");
- $("#endgcode").append("M107 \n");
- $("#endgcode").append("M84 (disable axes) \n");
- console.log("$('#endgcode'): " + $("#endgcode").val());
- }, 1000);
- //*/
- }
-<<<<<<< .merge_file_HNcA77
-=======
- //showhideInterval = setInterval(showOrHideThermo, 2500);
->>>>>>> .merge_file_0hlg7g
-});
-
-/*var showhideInterval;
-var showOrHide = false;
-
-function showOrHideThermo() {
- console.log("f:showOrHideThermo()");
- if (showOrHide) {
- thermometer.hide();
- progressbar.hide();
- } else {
- thermometer.show();
- progressbar.show();
-
- }
- showOrHide = !showOrHide;
-}*/
-
-function settingsLoaded() {
- console.log("settingsLoaded");
- console.log("autoHeatup: ",settings["printer.heatup.enabled"]);
- if(settings["printer.heatup.enabled"]) {
- if(firstTimeSettingsLoaded) {
- printer.preheat();
- firstTimeSettingsLoaded = false;
- }
- }
-}
-
-function setDebugText(text) {
- $("#debug_display").text(text);
-}
diff --git a/js_old/previewRendering_v01.js b/js_old/previewRendering_v01.js
deleted file mode 100644
index 1728b56..0000000
--- a/js_old/previewRendering_v01.js
+++ /dev/null
@@ -1,209 +0,0 @@
-//*
-var $preview;
-var preview;
-var previewCtx;
-
-$preview = $("#preview");
-preview = document.getElementById('preview');
-previewCtx = preview.getContext('2d');
-
-var svgPathRegExp = /[LM]\d* \d*/ig;
-var svgPathParamsRegExp = /([LM])(\d*) (\d*)/;
-
-var prevRedrawTime = new Date().getTime();
-var redrawInterval = 1000 / 30; // ms
-
-function initPreviewRendering() {
- console.log("f:initPreviewRendering()");
-
- layerCX = (canvasWidth / 2) * globalScale; // defined in canvasDrawing_v01.js
- layerCY = (canvasHeight / 2) * globalScale; // defined in canvasDrawing_v01.js
- layerOffsetY = preview.height - 1.75 * layerCY;
- yStep = preview.height / 150;
-
- redrawPreview();
-}
-
-//var numLayers = 100; //50
-var numLayers = 100; // 100
-var globalScale = 0.3; // global scale of preview (width preview / width canvas)
-var globalAlpha = 0.20; // global alpha of preview
-var scaleY = 0.4; // additional vertical scale per path for 3d effect
-var viewerScale = 0.65; // additional scale to fit into preview nicely (otherwise is fills out totally)
-var strokeWidth = 2; //4;
-//var rStep = Math.PI/40; //Math.PI/40; //
-var rStep = Math.PI/45; // Math.PI/180; //Math.PI/40; //
-var yStep = preview.height / 150; // 3; //6;
-//var svgWidth = 500; // 650 //parseInt($(svg).css("width"));
-//var svgHeight = 450; //450; //parseInt($(svg).css("height"));
-var layerCX = (canvasWidth / 2) * globalScale; // defined in canvasDrawing_v01.js
-var layerCY = (canvasHeight / 2) * globalScale; // defined in canvasDrawing_v01.js
-var layerOffsetY= preview.height - 1.75 * layerCY; // 330; // previewHeight - 120
-var prevX = 0;
-var prevY = 0;
-var highlight = true; //highlight bottom, middle and top layers
-
-var linesRaw = "";
-var debug_redrawSimplification = 6;
-function redrawPreview(redrawLess) {
- if (redrawLess == undefined) redrawLess = false;
- //*/
- //TODO
- /*
- het up/down en twist left/right gaat nu wat traag. Juist dat gaat veel sneller met de toDataURL oplossing
- Is het een idee om op het einde van een touchevent wel de image versie te renderen maar tijdens het tekenen
- niet?
- */
-
- if (!redrawLess) {
- //debug_redrawSimplification = Math.round(_points.length / 65);
- //*
- if (_points.length < 100) {
- debug_redrawSimplification = 6;
- } else if (_points.length < 250) {
- debug_redrawSimplification = 7;
- } else if (_points.length < 400) {
- debug_redrawSimplification = 8;
- } else if (_points.length < 550) {
- debug_redrawSimplification = 9;
- } else if (_points.length < 700) {
- debug_redrawSimplification = 10;
- } else {
- debug_redrawSimplification = 11;
- }
- //*/
-// console.log("debug_redrawSimplification: " + debug_redrawSimplification);
- }
-
- if (_points.length < 2) return;
-
- var y = 0;
- var r = 0;
-
- //preview.width = preview.width;
- previewCtx.clearRect(0, 0, preview.width, preview.height);
- previewCtx.lineWidth = strokeWidth;
- previewCtx.strokeStyle = '#f00'; //"rgba(255,255,0,0)";
-
- for(var i = 0; i < numLayers; i++) {
-
-
- if(i == 0 || i == Math.floor(numLayers/2) || i == numLayers-1) {
- previewCtx.globalAlpha = 1;
- } else {
- previewCtx.globalAlpha = globalAlpha;
- }
-
- if (redrawLess && i%debug_redrawSimplification != 0 && !(i == 0 || i == Math.floor(numLayers/2) || i == numLayers-1) ) {
- y -= yStep;
- r += rStep;
- continue;
- }
-
- previewCtx.save();
-
- previewCtx.translate(layerCX, layerOffsetY + layerCY + y);
-// previewCtx.setTransform(1, 0, 0, scaleY, layerCX, layerOffsetY+layerCY+y);
- previewCtx.scale(viewerScale, scaleY * viewerScale);
- previewCtx.rotate(r);
- previewCtx.translate((-doodleTransform[0]) * (globalScale * doodleTransform[2]), (-doodleTransform[1]) * (globalScale * doodleTransform[3]));
-// previewCtx.translate(-layerCX,-layerCY);
-// previewCtx.translate(-doodleTransform[0] * globalScale, -doodleTransform[1] * globalScale);
-
-// previewCtx.setTransform(doodleTransform[2], 0, 0, doodleTransform[3], 0, 0);
-
- var adjustedDoodlePoint = centeredAndScaledDoodlePoint(_points[0]);
-
- previewCtx.beginPath();
- previewCtx.moveTo(adjustedDoodlePoint.x, adjustedDoodlePoint.y);
- for(var j = 1; j < _points.length; j++) {
- adjustedDoodlePoint = centeredAndScaledDoodlePoint(_points[j])
-// if (redrawLess && Math.floor(j/debug_redrawSimplification)%2 == 0 ) continue;
-// if (redrawLess && Math.floor(j/debug_redrawSimplification)%2 == 0 ) continue;
- if (redrawLess && j%debug_redrawSimplification != 0 ) continue;
- previewCtx.lineTo(adjustedDoodlePoint.x, adjustedDoodlePoint.y);
- }
- previewCtx.stroke();
-
- y -= yStep;
- r += rStep;
- previewCtx.restore();
- }
- previewCtx.globalAlpha = globalAlpha;
-}
-
-function centeredAndScaledDoodlePoint(p) {
- var obj = { x: 0, y: 0};
-
- obj.x = (p[0] - ((doodleBounds[2] - doodleBounds[0])/2)) * (globalScale * doodleTransform[2]);
- obj.y = (p[1] - ((doodleBounds[3] - doodleBounds[1])/2)) * (globalScale * doodleTransform[3]);
-// obj.x = (p[0] - (doodleBounds[2] - doodleBounds[0])) * (globalScale * doodleTransform[2]);
-// obj.y = (p[1] - (doodleBounds[3] - doodleBounds[1])) * (globalScale * doodleTransform[3]);
-// obj.x = (p[0] - doodleTransform[0]) * (globalScale * doodleTransform[2]);
-// obj.y = (p[1] - doodleTransform[1]) * (globalScale * doodleTransform[3]);
-
- return obj;
-}
-
-//*
-var updatePrevX = -1;
-var updatePrevY = -1;
-function updatePreview(_x, _y, redrawLess) {
- if (redrawLess == undefined) redrawLess = false;
- redrawLess = false;
-
- if (_points.length < 2) return;
- if (updatePrevX == -1 || updatePrevY == -1) {
- updatePrevX = _x;
- updatePrevY = _y;
- return;
- }
-
-// if (_points.length < 16 && Math.sqrt(Math.pow((updatePrevX - _x), 2) + Math.pow((updatePrevY - _y), 2)) < 8) return;
-
- var y = 0;
- var r = 0;
-
- previewCtx.lineWidth = strokeWidth;
- previewCtx.strokeStyle = '#f00'; //"rgba(255,255,0,0)";
-
- for(var i = 0; i < numLayers; i++) {
-
-
- if(i == 0 || i == Math.floor(numLayers/2) || i == numLayers-1) {
- previewCtx.globalAlpha = 1;
- } else {
- previewCtx.globalAlpha = globalAlpha;
- }
-
- if (redrawLess && i%debug_redrawSimplification != 0 && !(i == 0 || i == Math.floor(numLayers/2) || i == numLayers-1) ) {
- y -= yStep;
- r += rStep;
- continue;
- }
-
- previewCtx.save();
-
- previewCtx.translate(layerCX, layerOffsetY + layerCY + y);
- previewCtx.scale(viewerScale, scaleY * viewerScale);
- previewCtx.rotate(r);
- previewCtx.translate((-doodleTransform[0]) * (globalScale * doodleTransform[2]), (-doodleTransform[1]) * (globalScale * doodleTransform[3]));
-
-
- previewCtx.beginPath();
- var prevPoint = centeredAndScaledDoodlePoint([updatePrevX, updatePrevY]);
- previewCtx.moveTo(prevPoint.x, prevPoint.y);
- var adjustedDoodlePoint = centeredAndScaledDoodlePoint([_x, _y]);
- previewCtx.lineTo(adjustedDoodlePoint.x, adjustedDoodlePoint.y);
- previewCtx.stroke();
-
- y -= yStep;
- r += rStep;
- previewCtx.restore();
- }
- previewCtx.globalAlpha = globalAlpha;
- updatePrevX = _x;
- updatePrevY = _y;
-
-}
-//*/
\ No newline at end of file
diff --git a/js_old/previewRendering_v02.js.orig b/js_old/previewRendering_v02.js.orig
deleted file mode 100644
index a5e9dd0..0000000
--- a/js_old/previewRendering_v02.js.orig
+++ /dev/null
@@ -1,355 +0,0 @@
-//*
-var $preview;
-var preview;
-var previewCtx;
-
-var preview_tmp;
-var previewCtx_tmp;
-
-var previewDefaults = {
- rotation: Math.PI/90,
- numLayers: 10
-}
-
-var svgPathRegExp = /[LM]\d* \d*/ig;
-var svgPathParamsRegExp = /([LM])(\d*) (\d*)/;
-
-var prevRedrawTime = new Date().getTime();
-var redrawInterval = 1000 / 30; // ms
-
-function initPreviewRendering() {
- console.log("f:initPreviewRendering()");
-
- $preview = $("#preview");
- preview = $preview[0];
- previewCtx = preview.getContext('2d');
-
- // DEBUG --> mbt preview_tmp (voor de toImageData truc)
- var _ratio = preview.width / canvas.width;
- preview_tmp = document.getElementById('preview_tmp');
- preview_tmp.width = preview.width;
- preview_tmp.height = canvas.height * _ratio;
- $("#preview_tmp").css("top", -preview_tmp.height);
-
- previewCtx_tmp = preview_tmp.getContext('2d');
-
- calcPreviewCanvasProperties();
- redrawPreview();
-}
-
-function calcPreviewCanvasProperties() {
- console.log("f:calcPreviewCanvasProperties()");
-
- globalScale = preview.width / canvasWidth;
- layerCX = (canvasWidth / 2) * globalScale; // defined in canvasDrawing_v01.js
- layerCY = (canvasHeight / 2) * globalScale; // defined in canvasDrawing_v01.js
-// layerOffsetY = preview.height - 1.75 * layerCY;
- layerOffsetY = preview.height * (1 - previewVerticalPadding.bottom);
- yStep = (preview.height - (preview.height * (previewVerticalPadding.top + previewVerticalPadding.bottom))) / maxNumLayers;
-}
-
-// TODO (perhaps) : make the twist limit dynamic, depending on what's printable (w.r.t. overlapping)
-var previewRotationLimit = Math.PI / 30; // rough estimate
-
-var numLayers = previewDefaults.numLayers; // current number of preview layers
-var maxNumLayers= 100; // maximum number of preview layers
-var minNumLayers= 2; // minimum number of preview layers
-var globalScale = 0.3; // global scale of preview (width preview / width canvas)
-var globalAlpha = 0.20; // global alpha of preview
-var scaleY = 0.4; // additional vertical scale per path for 3d effect
-var viewerScale = 0.65; // additional scale to fit into preview nicely (otherwise is fills out totally)
-var previewVerticalPadding = { "top" : .15, "bottom" : 0.12 }; // %
-var strokeWidth = 2; //4;
-//var rStep = Math.PI/40; //Math.PI/40; //
-var rStep = previewDefaults.rotation; // Math.PI/180; //Math.PI/40; //
-var yStep;// = preview.height / 150; // 3; //6;
-//var svgWidth = 500; // 650 //parseInt($(svg).css("width"));
-//var svgHeight = 450; //450; //parseInt($(svg).css("height"));
-var layerCX, layerCY;
-//var layerCX = (canvasWidth / 2) * globalScale; // defined in canvasDrawing_v01.js
-//var layerCY = (canvasHeight / 2) * globalScale; // defined in canvasDrawing_v01.js
-var layerOffsetY; //= preview.height - 1.75 * layerCY; // 330; // previewHeight - 120
-var prevX = 0;
-var prevY = 0;
-var highlight = true; //highlight bottom, middle and top layers
-
-var linesRaw = "";
-var debug_redrawSimplification = 6;
-function redrawPreview(redrawLess) {
- if (redrawLess == undefined) redrawLess = false;
-
- if (_points.length < 2) return;
-
- if (!redrawLess) {
- //debug_redrawSimplification = Math.round(_points.length / 65);
- //*
- if (_points.length < 100) {
- debug_redrawSimplification = 6;
- } else if (_points.length < 250) {
- debug_redrawSimplification = 7;
- } else if (_points.length < 400) {
- debug_redrawSimplification = 8;
- } else if (_points.length < 550) {
- debug_redrawSimplification = 9;
- } else if (_points.length < 700) {
- debug_redrawSimplification = 10;
- } else {
- debug_redrawSimplification = 11;
- }
- //*/
-// console.log("debug_redrawSimplification: " + debug_redrawSimplification);
- }
-
- var y = 0;
- var r = 0;
-
- //preview.width = preview.width;
- previewCtx.clearRect(0, 0, preview.width, preview.height);
- previewCtx.lineWidth = strokeWidth;
- previewCtx.strokeStyle = '#f00'; //"rgba(255,255,0,0)";
-
- for(var i = 0; i < numLayers; i++) {
-
- var verticalScaleFactor = scaleFunction(i / maxNumLayers);
-
- if(i == 0 || i == Math.floor(numLayers/2) || i == numLayers-1) {
- previewCtx.globalAlpha = 1;
- } else {
- previewCtx.globalAlpha = globalAlpha;
- }
-
- if (redrawLess && i%debug_redrawSimplification != 0 && !(i == 0 || i == Math.floor(numLayers/2) || i == numLayers-1) ) {
- y -= yStep;
- r += rStep;
- continue;
- }
-
- previewCtx.save();
-
-// previewCtx.translate(layerCX, layerOffsetY + layerCY + y);
- previewCtx.translate(layerCX, layerOffsetY + y);
-// previewCtx.setTransform(1, 0, 0, scaleY, layerCX, layerOffsetY+layerCY+y);
- previewCtx.scale(viewerScale * verticalScaleFactor, scaleY * viewerScale * verticalScaleFactor);
- previewCtx.rotate(r);
- previewCtx.translate((-doodleTransform[0]) * (globalScale * doodleTransform[2]), (-doodleTransform[1]) * (globalScale * doodleTransform[3]));
-
- var adjustedDoodlePoint = centeredAndScaledDoodlePoint(_points[0]);
-
- previewCtx.beginPath();
- previewCtx.moveTo(adjustedDoodlePoint.x, adjustedDoodlePoint.y);
- for(var j = 1; j < _points.length; j++) {
- adjustedDoodlePoint = centeredAndScaledDoodlePoint(_points[j])
- if (redrawLess && j%debug_redrawSimplification != 0 ) continue;
- previewCtx.lineTo(adjustedDoodlePoint.x, adjustedDoodlePoint.y);
- }
- previewCtx.stroke();
-
- y -= yStep;
- r += rStep;
- previewCtx.restore();
- }
- previewCtx.globalAlpha = globalAlpha;
-}
-
-function renderToImageDataPreview() {
- console.log("f:renderToImageDataPreview()");
-
- if (_points.length < 2) return;
-
- //*
- // the first step
- previewCtx_tmp.clearRect(0, 0, preview.width, preview.height);
- previewCtx_tmp.lineWidth = strokeWidth;
- previewCtx_tmp.strokeStyle = '#f00'; //"rgba(255,255,0,0)";
-
- previewCtx_tmp.save();
- previewCtx_tmp.translate(layerCX, layerCY);
- previewCtx_tmp.scale(viewerScale, viewerScale);
- previewCtx_tmp.translate((-doodleTransform[0]) * (globalScale * doodleTransform[2]), (-doodleTransform[1]) * (globalScale * doodleTransform[3]));
-
- var adjustedDoodlePt = centeredAndScaledDoodlePoint(_points[0]);
-
- previewCtx_tmp.beginPath();
- previewCtx_tmp.moveTo(adjustedDoodlePt.x, adjustedDoodlePt.y);
- for(var j = 1; j < _points.length; j++) {
- adjustedDoodlePt = centeredAndScaledDoodlePoint(_points[j])
- previewCtx_tmp.lineTo(adjustedDoodlePt.x, adjustedDoodlePt.y);
- }
- previewCtx_tmp.stroke();
- previewCtx_tmp.closePath();
- previewCtx_tmp.restore();
- //*/
-
- // var saved_rect = previewCtx_tmp.getImageData(0, 0, layerCX*2, layerCY*2);
- var saved_rect_todataurl = preview_tmp.toDataURL();
- doodleImageCapture = new Image();
- doodleImageCapture.onload = function() {
-
- previewCtx.clearRect(0, 0, preview.width, preview.height);
- previewCtx.lineWidth = strokeWidth;
- previewCtx.strokeStyle = '#f00'; //"rgba(255,255,0,0)";
-
- var y = 0;
- var r = 0;
-
- for(var i=0;i>>>>>> new_layouting_approach
- previewCtx.rotate(r);
- previewCtx.translate(-layerCX,-layerCY);
-
- previewCtx.drawImage(doodleImageCapture, 0, 0);
-
- y -= yStep;
- r += rStep;
- previewCtx.restore();
- }
- };
- doodleImageCapture.src = saved_rect_todataurl;
-
- previewCtx.globalAlpha = globalAlpha;
-}
-
-// called by the move up/down or twist left/right buttons
-// it is assumed that the preview has been rendered to an Image object, which will be used to draw the preview with (much better performance)
-function redrawRenderedPreview(redrawLess) {
- if (redrawLess == undefined) redrawLess = false;
- console.log("f:redrawRenderedPreview()");
-
- previewCtx.clearRect(0, 0, preview.width, preview.height);
- previewCtx.lineWidth = strokeWidth;
- previewCtx.strokeStyle = '#f00'; //"rgba(255,255,0,0)";
-
- var y = 0;
- var r = 0;
-
- for(var i = 0; i < numLayers; i++) {
-
- var verticalScaleFactor = scaleFunction(i / maxNumLayers);
-
- if(i == 0 || i == Math.floor(numLayers/2) || i == numLayers-1){
- previewCtx.globalAlpha = 1;
- } else {
- previewCtx.globalAlpha = globalAlpha;
- }
-
- if (redrawLess && i%2 != 0 && !(i == 0 || i == Math.floor(numLayers/2) || i == numLayers-1) ) {
- y -= yStep;
- r += rStep;
- continue;
- }
- previewCtx.save();
-
-<<<<<<< HEAD
- previewCtx.translate(layerCX,layerOffsetY+layerCY+y);
-// previewCtx.scale(1, scaleY)
- previewCtx.scale(verticalScaleFactor, scaleY * verticalScaleFactor);
-=======
- previewCtx.translate(layerCX,layerOffsetY+y);
-// previewCtx.translate(layerCX,layerOffsetY+layerCY+y);
- previewCtx.scale(1, scaleY)
->>>>>>> new_layouting_approach
- previewCtx.rotate(r);
- previewCtx.translate(-layerCX,-layerCY);
-
- previewCtx.drawImage(doodleImageCapture, 0, 0);
-
- y -= yStep;
- r += rStep;
- previewCtx.restore();
- }
-}
-
-function centeredAndScaledDoodlePoint(p) {
- var obj = { x: 0, y: 0};
-
- obj.x = (p[0] - ((doodleBounds[2] - doodleBounds[0])/2)) * (globalScale * doodleTransform[2]);
- obj.y = (p[1] - ((doodleBounds[3] - doodleBounds[1])/2)) * (globalScale * doodleTransform[3]);
-// obj.x = (p[0] - (doodleBounds[2] - doodleBounds[0])) * (globalScale * doodleTransform[2]);
-// obj.y = (p[1] - (doodleBounds[3] - doodleBounds[1])) * (globalScale * doodleTransform[3]);
-// obj.x = (p[0] - doodleTransform[0]) * (globalScale * doodleTransform[2]);
-// obj.y = (p[1] - doodleTransform[1]) * (globalScale * doodleTransform[3]);
-
- return obj;
-}
-
-//*
-var updatePrevX = -1;
-var updatePrevY = -1;
-function updatePreview(_x, _y, redrawLess) {
- if (redrawLess == undefined) redrawLess = false;
- redrawLess = false;
-
- if (_points.length < 2) return;
- if (updatePrevX == -1 || updatePrevY == -1) {
- updatePrevX = _x;
- updatePrevY = _y;
- return;
- }
-
-// if (_points.length < 16 && Math.sqrt(Math.pow((updatePrevX - _x), 2) + Math.pow((updatePrevY - _y), 2)) < 8) return;
-
- var y = 0;
- var r = 0;
-
- previewCtx.lineWidth = strokeWidth;
- previewCtx.strokeStyle = '#f00'; //"rgba(255,255,0,0)";
-
- for(var i = 0; i < numLayers; i++) {
-
- if(i == 0 || i == Math.floor(numLayers/2) || i == numLayers-1) {
- previewCtx.globalAlpha = 1;
- } else {
- previewCtx.globalAlpha = globalAlpha;
- }
-
- if (redrawLess && i%debug_redrawSimplification != 0 && !(i == 0 || i == Math.floor(numLayers/2) || i == numLayers-1) ) {
- y -= yStep;
- r += rStep;
- continue;
- }
-
- previewCtx.save();
-
-// previewCtx.translate(layerCX, layerOffsetY + layerCY + y);
- previewCtx.translate(layerCX, layerOffsetY + y);
- previewCtx.scale(viewerScale, scaleY * viewerScale);
- previewCtx.rotate(r);
- previewCtx.translate((-doodleTransform[0]) * (globalScale * doodleTransform[2]), (-doodleTransform[1]) * (globalScale * doodleTransform[3]));
-
-
- previewCtx.beginPath();
- var prevPoint = centeredAndScaledDoodlePoint([updatePrevX, updatePrevY]);
- previewCtx.moveTo(prevPoint.x, prevPoint.y);
- var adjustedDoodlePoint = centeredAndScaledDoodlePoint([_x, _y]);
- previewCtx.lineTo(adjustedDoodlePoint.x, adjustedDoodlePoint.y);
- previewCtx.stroke();
-
- y -= yStep;
- r += rStep;
- previewCtx.restore();
- }
- previewCtx.globalAlpha = globalAlpha;
- updatePrevX = _x;
- updatePrevY = _y;
-
-}
-//*/
\ No newline at end of file
diff --git a/less/base_centerpanel.less b/less/base_centerpanel.less
index 84df0e6..fbfdfb6 100644
--- a/less/base_centerpanel.less
+++ b/less/base_centerpanel.less
@@ -6,6 +6,7 @@
width: @center-panel-width;
height: 100%;
padding-top: 1%;
+ border: 1px solid red;
}
.logopanel {
diff --git a/less/buttons.less b/less/buttons.less
index ac6ddce..09faaad 100644
--- a/less/buttons.less
+++ b/less/buttons.less
@@ -143,23 +143,43 @@
.buttonGroup {
background-color: white;
- z-index: 1000;
position: absolute;
- left: 60px;
- border: 4px solid black;
+ border: 3px solid black;
border-radius: 40px;
box-sizing: border-box;
- width: 200px;
padding: 5% 5% 5% 5%;
}
.buttonGroupAdd {
display: none;
+ z-index: 1000;
margin-top: -60%;
+ left: 60px;
+ width: 140px; /*fixme: can this grow based on it's content?*/
+
+ .btnWordArt, .btnShape {
+ width: 60px; /* scaled down >50% */
+ float: left;
+ }
}
-.btnWordArt, .btnShape {
- width: 48%;
- float: left;
+.buttonGroupVertical {
+ top: 10px;
+ left: 10px;
+ padding-top: 20px;
+ width: 65px;
+
+ .btn {
+ width: 40px;
+ }
}
+.btnToggleVertical {
+ position: absolute;
+ top: 0;
+ left: 10px;
+}
+
+
+
+
diff --git a/www/img/buttons/_btnShape.png b/www/img/buttons/_btnShape.png
deleted file mode 100644
index 3f7b34a..0000000
Binary files a/www/img/buttons/_btnShape.png and /dev/null differ
diff --git a/www/img/buttons/_btnWordArt.png b/www/img/buttons/_btnWordArt.png
deleted file mode 100644
index cd029bc..0000000
Binary files a/www/img/buttons/_btnWordArt.png and /dev/null differ
diff --git a/www/img/buttons/btnAddOpen.png b/www/img/buttons/btnAddOpen.png
deleted file mode 100644
index 72ea6f7..0000000
Binary files a/www/img/buttons/btnAddOpen.png and /dev/null differ
diff --git a/www/img/buttons/btnArrowOpen.png b/www/img/buttons/btnArrowOpen.png
new file mode 100644
index 0000000..7b76cdb
Binary files /dev/null and b/www/img/buttons/btnArrowOpen.png differ
diff --git a/www/img/buttons/btnOops2.png b/www/img/buttons/btnOops2.png
deleted file mode 100644
index acd9193..0000000
Binary files a/www/img/buttons/btnOops2.png and /dev/null differ
diff --git a/www/img/buttons/btnOops_disabled.png b/www/img/buttons/btnOops_disabled.png
deleted file mode 100644
index c34985c..0000000
Binary files a/www/img/buttons/btnOops_disabled.png and /dev/null differ
diff --git a/www/img/buttons/btnPrint2.png b/www/img/buttons/btnPrint2.png
deleted file mode 100644
index 7e40dfe..0000000
Binary files a/www/img/buttons/btnPrint2.png and /dev/null differ
diff --git a/www/img/buttons/btnPrint_disabled.png b/www/img/buttons/btnPrint_disabled.png
deleted file mode 100644
index 667d292..0000000
Binary files a/www/img/buttons/btnPrint_disabled.png and /dev/null differ
diff --git a/www/img/buttons/btnRotate.png b/www/img/buttons/btnRotate.png
deleted file mode 100644
index aff4b50..0000000
Binary files a/www/img/buttons/btnRotate.png and /dev/null differ
diff --git a/www/img/buttons/btnStop2.png b/www/img/buttons/btnStop2.png
deleted file mode 100644
index 2e9e611..0000000
Binary files a/www/img/buttons/btnStop2.png and /dev/null differ
diff --git a/www/img/buttons/btnStop_disabled.png b/www/img/buttons/btnStop_disabled.png
deleted file mode 100644
index 78b5312..0000000
Binary files a/www/img/buttons/btnStop_disabled.png and /dev/null differ
diff --git a/www/img/buttons/btnTwist.png b/www/img/buttons/btnTwist.png
deleted file mode 100644
index ff33380..0000000
Binary files a/www/img/buttons/btnTwist.png and /dev/null differ
diff --git a/www/img/buttons/btnTurnLeft.png b/www/img/buttons/btnTwistLeft.png
similarity index 100%
rename from www/img/buttons/btnTurnLeft.png
rename to www/img/buttons/btnTwistLeft.png
diff --git a/www/img/buttons/btnTurnRight.png b/www/img/buttons/btnTwistRight.png
similarity index 100%
rename from www/img/buttons/btnTurnRight.png
rename to www/img/buttons/btnTwistRight.png
diff --git a/www/img/buttons/btnUpDown.png b/www/img/buttons/btnUpDown.png
deleted file mode 100644
index f591d10..0000000
Binary files a/www/img/buttons/btnUpDown.png and /dev/null differ
diff --git a/www/img/buttons/btnZoomInOut.png b/www/img/buttons/btnZoomInOut.png
deleted file mode 100644
index 5240779..0000000
Binary files a/www/img/buttons/btnZoomInOut.png and /dev/null differ
diff --git a/www/img/buttons/collapsed.gif b/www/img/buttons/collapsed.gif
deleted file mode 100644
index 108ff04..0000000
Binary files a/www/img/buttons/collapsed.gif and /dev/null differ
diff --git a/www/img/buttons/expanded.gif b/www/img/buttons/expanded.gif
deleted file mode 100644
index f520c08..0000000
Binary files a/www/img/buttons/expanded.gif and /dev/null differ
diff --git a/www/img/logo/old/_logo_full.png b/www/img/logo/old/_logo_full.png
deleted file mode 100644
index 13601b7..0000000
Binary files a/www/img/logo/old/_logo_full.png and /dev/null differ
diff --git a/www/img/logo/old/logo_full.png b/www/img/logo/old/logo_full.png
deleted file mode 100644
index 6ad857d..0000000
Binary files a/www/img/logo/old/logo_full.png and /dev/null differ
diff --git a/www/img/logo/old/logo_small.png b/www/img/logo/old/logo_small.png
deleted file mode 100644
index 80e0060..0000000
Binary files a/www/img/logo/old/logo_small.png and /dev/null differ
diff --git a/www/img/logo/old/logo_smaller.png b/www/img/logo/old/logo_smaller.png
deleted file mode 100644
index bdc9393..0000000
Binary files a/www/img/logo/old/logo_smaller.png and /dev/null differ
diff --git a/www/img/logo/old/logo_smallest.png b/www/img/logo/old/logo_smallest.png
deleted file mode 100644
index 679c44d..0000000
Binary files a/www/img/logo/old/logo_smallest.png and /dev/null differ
diff --git a/www/index.html b/www/index.html
index 6618b7e..78a35cc 100644
--- a/www/index.html
+++ b/www/index.html
@@ -24,7 +24,7 @@
-
+
@@ -43,7 +43,7 @@
-
+
@@ -58,16 +58,16 @@
-
+
-
+
+
-->
@@ -96,6 +96,18 @@
+
+