summaryrefslogtreecommitdiff
path: root/static
diff options
context:
space:
mode:
Diffstat (limited to 'static')
-rw-r--r--static/website/css/main.css123
-rw-r--r--static/website/images/100x75.gifbin0 -> 326 bytes
-rw-r--r--static/website/images/200px-Latex_logo_bw.gifbin0 -> 3235 bytes
-rw-r--r--static/website/images/400px-LibreOffice_icons_256.pngbin0 -> 68642 bytes
-rw-r--r--static/website/images/Advanced-C++.jpgbin0 -> 1855 bytes
-rw-r--r--static/website/images/Advanced-C++.pngbin0 -> 3972 bytes
-rw-r--r--static/website/images/BASH.jpgbin0 -> 1320 bytes
-rw-r--r--static/website/images/BASH.pngbin0 -> 2738 bytes
-rw-r--r--static/website/images/Blender.jpgbin0 -> 1474 bytes
-rw-r--r--static/website/images/C-and-C++.jpgbin0 -> 1449 bytes
-rw-r--r--static/website/images/CellDesigner.gifbin0 -> 2510 bytes
-rw-r--r--static/website/images/CellDesigner.jpgbin0 -> 1928 bytes
-rw-r--r--static/website/images/Digital-Divide.gifbin0 -> 2851 bytes
-rw-r--r--static/website/images/Digital-Divide.jpgbin0 -> 1911 bytes
-rw-r--r--static/website/images/Drupal.jpgbin0 -> 2052 bytes
-rw-r--r--static/website/images/Firefox.jpgbin0 -> 2328 bytes
-rw-r--r--static/website/images/GChemPaing.jpgbin0 -> 2112 bytes
-rw-r--r--static/website/images/GChemPaint.jpgbin0 -> 2112 bytes
-rw-r--r--static/website/images/GIMP.jpgbin0 -> 1895 bytes
-rw-r--r--static/website/images/GNS3.jpgbin0 -> 2300 bytes
-rw-r--r--static/website/images/GNUstep_logo.svg49
-rw-r--r--static/website/images/GSchem.gifbin0 -> 2230 bytes
-rw-r--r--static/website/images/GSchem.jpgbin0 -> 1553 bytes
-rw-r--r--static/website/images/GeoGebra-for-Engineering-drawing.jpgbin0 -> 1947 bytes
-rw-r--r--static/website/images/Geogebra.jpgbin0 -> 1947 bytes
-rw-r--r--static/website/images/Java-Business-Application.gifbin0 -> 3970 bytes
-rw-r--r--static/website/images/Java-Business-Application.jpgbin0 -> 2153 bytes
-rw-r--r--static/website/images/Java.jpgbin0 -> 1646 bytes
-rw-r--r--static/website/images/Java_logo.pngbin0 -> 41732 bytes
-rw-r--r--static/website/images/KTouch.jpgbin0 -> 1476 bytes
-rw-r--r--static/website/images/KTurtle.jpgbin0 -> 2090 bytes
-rw-r--r--static/website/images/KTurtle_logo.pngbin0 -> 11024 bytes
-rw-r--r--static/website/images/KiCad.jpgbin0 -> 2225 bytes
-rw-r--r--static/website/images/Kicad_logo_new.pngbin0 -> 13962 bytes
-rw-r--r--static/website/images/LaTeX.jpgbin0 -> 1575 bytes
-rw-r--r--static/website/images/LibreOffice-Suite-Base.jpgbin0 -> 1067 bytes
-rw-r--r--static/website/images/LibreOffice-Suite-Calc.jpgbin0 -> 1764 bytes
-rw-r--r--static/website/images/LibreOffice-Suite-Draw.jpgbin0 -> 1712 bytes
-rw-r--r--static/website/images/LibreOffice-Suite-Impress.jpgbin0 -> 1764 bytes
-rw-r--r--static/website/images/LibreOffice-Suite-Math.jpgbin0 -> 1461 bytes
-rw-r--r--static/website/images/LibreOffice-Suite-Writer.jpgbin0 -> 1810 bytes
-rw-r--r--static/website/images/Linux.jpgbin0 -> 1580 bytes
-rw-r--r--static/website/images/Linux_logo.pngbin0 -> 498031 bytes
-rw-r--r--static/website/images/Netbeans.jpgbin0 -> 1379 bytes
-rw-r--r--static/website/images/Ngspice.jpgbin0 -> 1810 bytes
-rw-r--r--static/website/images/OpenFOAM.jpgbin0 -> 1343 bytes
-rw-r--r--static/website/images/OpenFoam-Logo.gifbin0 -> 4018 bytes
-rw-r--r--static/website/images/Orca.jpgbin0 -> 1592 bytes
-rw-r--r--static/website/images/Orca_icon.svg220
-rw-r--r--static/website/images/PERL.jpgbin0 -> 1715 bytes
-rw-r--r--static/website/images/PHP-and-MySQL.jpgbin0 -> 2159 bytes
-rw-r--r--static/website/images/Python-Old-Version.jpgbin0 -> 2165 bytes
-rw-r--r--static/website/images/Python.jpgbin0 -> 1365 bytes
-rw-r--r--static/website/images/QCad.jpgbin0 -> 2027 bytes
-rw-r--r--static/website/images/R.jpgbin0 -> 1635 bytes
-rw-r--r--static/website/images/Rlogo.jpgbin0 -> 3173 bytes
-rw-r--r--static/website/images/Ruby.jpgbin0 -> 1846 bytes
-rw-r--r--static/website/images/Ruby_logo.pngbin0 -> 196597 bytes
-rw-r--r--static/website/images/Scilab.jpgbin0 -> 2150 bytes
-rw-r--r--static/website/images/Selenium.jpgbin0 -> 1927 bytes
-rw-r--r--static/website/images/Single-Board-Heater-System.gifbin0 -> 3583 bytes
-rw-r--r--static/website/images/Single-Board-Heater-System.jpgbin0 -> 2015 bytes
-rw-r--r--static/website/images/Spoken-Tutorial-Technology.jpgbin0 -> 2458 bytes
-rw-r--r--static/website/images/Step.jpgbin0 -> 1336 bytes
-rw-r--r--static/website/images/Thunderbird.jpgbin0 -> 1658 bytes
-rw-r--r--static/website/images/Tux-Typing.jpgbin0 -> 1732 bytes
-rw-r--r--static/website/images/What-is-Spoken-Tutorial.jpgbin0 -> 2458 bytes
-rw-r--r--static/website/images/Xfig.jpgbin0 -> 2049 bytes
-rw-r--r--static/website/images/big-logo.pngbin0 -> 25192 bytes
-rw-r--r--static/website/images/camel_head.v25e738a.pngbin0 -> 2416 bytes
-rw-r--r--static/website/images/druplicon.large_.pngbin0 -> 25329 bytes
-rw-r--r--static/website/images/firefox_logo-only_RGB-300dpi.jpgbin0 -> 814507 bytes
-rw-r--r--static/website/images/gchempaint_logo.pngbin0 -> 115808 bytes
-rw-r--r--static/website/images/geogebra-logo.pngbin0 -> 50865 bytes
-rw-r--r--static/website/images/gimp-logo.pngbin0 -> 35754 bytes
-rw-r--r--static/website/images/ktouch_logo.pngbin0 -> 40752 bytes
-rw-r--r--static/website/images/logo.pngbin0 -> 4166 bytes
-rw-r--r--static/website/images/logo_gns3_small.pngbin0 -> 29034 bytes
-rw-r--r--static/website/images/logo_openfoam.jpgbin0 -> 2083 bytes
-rw-r--r--static/website/images/netbeans-logo.pngbin0 -> 60003 bytes
-rw-r--r--static/website/images/nglogo.jpgbin0 -> 6392 bytes
-rw-r--r--static/website/images/php_mysql_logo.jpgbin0 -> 38312 bytes
-rw-r--r--static/website/images/python-logo.pngbin0 -> 45421 bytes
-rw-r--r--static/website/images/pythonHi.gifbin0 -> 3765 bytes
-rw-r--r--static/website/images/python_logo_no_text.pngbin0 -> 8950 bytes
-rw-r--r--static/website/images/qcad_icon.pngbin0 -> 9644 bytes
-rw-r--r--static/website/images/rrr/Advanced-C++.jpgbin0 -> 1855 bytes
-rw-r--r--static/website/images/rrr/BASH.jpgbin0 -> 1320 bytes
-rw-r--r--static/website/images/rrr/Blender.jpgbin0 -> 1474 bytes
-rw-r--r--static/website/images/rrr/C-and-C++.jpgbin0 -> 1449 bytes
-rw-r--r--static/website/images/rrr/CellDesigner.jpgbin0 -> 1928 bytes
-rw-r--r--static/website/images/rrr/Digital-Divide.jpgbin0 -> 1911 bytes
-rw-r--r--static/website/images/rrr/Drupal.jpgbin0 -> 2052 bytes
-rw-r--r--static/website/images/rrr/Firefox.jpgbin0 -> 2328 bytes
-rw-r--r--static/website/images/rrr/GChemPaint.jpgbin0 -> 2112 bytes
-rw-r--r--static/website/images/rrr/GIMP.jpgbin0 -> 1895 bytes
-rw-r--r--static/website/images/rrr/GNS3.jpgbin0 -> 2300 bytes
-rw-r--r--static/website/images/rrr/GSchem.jpgbin0 -> 1553 bytes
-rw-r--r--static/website/images/rrr/GeoGebra-for-Engineering-drawing.jpgbin0 -> 1947 bytes
-rw-r--r--static/website/images/rrr/Geogebra.jpgbin0 -> 1947 bytes
-rw-r--r--static/website/images/rrr/Java-Business-Application.jpgbin0 -> 2153 bytes
-rw-r--r--static/website/images/rrr/Java.jpgbin0 -> 1646 bytes
-rw-r--r--static/website/images/rrr/KTouch.jpgbin0 -> 1476 bytes
-rw-r--r--static/website/images/rrr/KTurtle.jpgbin0 -> 2090 bytes
-rw-r--r--static/website/images/rrr/KiCad.jpgbin0 -> 2225 bytes
-rw-r--r--static/website/images/rrr/LaTeX.jpgbin0 -> 1575 bytes
-rw-r--r--static/website/images/rrr/LibreOffice-Suite-Base.jpgbin0 -> 1067 bytes
-rw-r--r--static/website/images/rrr/LibreOffice-Suite-Calc.jpgbin0 -> 1764 bytes
-rw-r--r--static/website/images/rrr/LibreOffice-Suite-Draw.jpgbin0 -> 1712 bytes
-rw-r--r--static/website/images/rrr/LibreOffice-Suite-Impress.jpgbin0 -> 1764 bytes
-rw-r--r--static/website/images/rrr/LibreOffice-Suite-Math.jpgbin0 -> 1461 bytes
-rw-r--r--static/website/images/rrr/LibreOffice-Suite-Writer.jpgbin0 -> 1810 bytes
-rw-r--r--static/website/images/rrr/Linux.jpgbin0 -> 1580 bytes
-rw-r--r--static/website/images/rrr/Netbeans.jpgbin0 -> 1379 bytes
-rw-r--r--static/website/images/rrr/Ngspice.jpgbin0 -> 1810 bytes
-rw-r--r--static/website/images/rrr/OpenFOAM.jpgbin0 -> 1343 bytes
-rw-r--r--static/website/images/rrr/Orca.jpgbin0 -> 1592 bytes
-rw-r--r--static/website/images/rrr/PERL.jpgbin0 -> 1715 bytes
-rw-r--r--static/website/images/rrr/PHP-and-MySQL.jpgbin0 -> 2159 bytes
-rw-r--r--static/website/images/rrr/Python-Old-Version.jpgbin0 -> 2165 bytes
-rw-r--r--static/website/images/rrr/Python.jpgbin0 -> 1365 bytes
-rw-r--r--static/website/images/rrr/QCad.jpgbin0 -> 2027 bytes
-rw-r--r--static/website/images/rrr/R.jpgbin0 -> 1635 bytes
-rw-r--r--static/website/images/rrr/Rlogo.jpgbin0 -> 3173 bytes
-rw-r--r--static/website/images/rrr/Ruby.jpgbin0 -> 1846 bytes
-rw-r--r--static/website/images/rrr/Scilab.jpgbin0 -> 2150 bytes
-rw-r--r--static/website/images/rrr/Selenium.jpgbin0 -> 1927 bytes
-rw-r--r--static/website/images/rrr/Single-Board-Heater-System.jpgbin0 -> 2015 bytes
-rw-r--r--static/website/images/rrr/Spoken-Tutorial-Technology.jpgbin0 -> 2458 bytes
-rw-r--r--static/website/images/rrr/Step.jpgbin0 -> 1336 bytes
-rw-r--r--static/website/images/rrr/Thunderbird.jpgbin0 -> 1658 bytes
-rw-r--r--static/website/images/rrr/Tux-Typing.jpgbin0 -> 1732 bytes
-rw-r--r--static/website/images/rrr/What-is-Spoken-Tutorial.jpgbin0 -> 2458 bytes
-rw-r--r--static/website/images/rrr/Xfig.jpgbin0 -> 2049 bytes
-rw-r--r--static/website/images/rrr/logo_openfoam.jpgbin0 -> 2083 bytes
-rw-r--r--static/website/images/scilab.pngbin0 -> 17761 bytes
-rw-r--r--static/website/images/thunderbird.jpgbin0 -> 592011 bytes
-rw-r--r--static/website/images/tux-typing-1.pngbin0 -> 14414 bytes
-rw-r--r--static/website/images/xfig_splash_logo.pngbin0 -> 7648 bytes
-rw-r--r--static/website/js/custom.js1
-rwxr-xr-x[-rw-r--r--]static/website/js/nicEdit.js1717
-rwxr-xr-x[-rw-r--r--]static/website/js/nicEditorIcons.gifbin3351 -> 3716 bytes
-rw-r--r--static/website/js/thread-user.js162
-rw-r--r--static/website/slick/ajax-loader.gifbin0 -> 4178 bytes
-rw-r--r--static/website/slick/fonts/slick.eotbin0 -> 2048 bytes
-rw-r--r--static/website/slick/fonts/slick.svg14
-rw-r--r--static/website/slick/fonts/slick.ttfbin0 -> 1892 bytes
-rw-r--r--static/website/slick/fonts/slick.woffbin0 -> 1380 bytes
-rw-r--r--static/website/slick/slick.css47
-rw-r--r--static/website/slick/slick.js1668
-rw-r--r--static/website/slick/slick.min.js1
-rw-r--r--static/website/slick/slick.scss223
-rw-r--r--static/website/templates/ajax-keyword-search.html4
-rw-r--r--static/website/templates/ajax-time-search.html4
-rw-r--r--static/website/templates/base.html25
-rw-r--r--static/website/templates/filter.html4
-rw-r--r--static/website/templates/get-question.html286
-rw-r--r--static/website/templates/index.html252
-rw-r--r--static/website/templates/notify.html12
-rw-r--r--static/website/templates/recent-questions.html106
-rw-r--r--static/website/templates/recent_questions.html5
-rw-r--r--static/website/templates/user-answers.html (renamed from static/website/templates/user-replies.html)12
162 files changed, 4643 insertions, 292 deletions
diff --git a/static/website/css/main.css b/static/website/css/main.css
index 27d0e10..b07b73c 100644
--- a/static/website/css/main.css
+++ b/static/website/css/main.css
@@ -1,5 +1,8 @@
@import url(http://fonts.googleapis.com/css?family=Varela+Round);
/* override bootstrap */
+hr {
+ border-top: 1px solid #424242;
+}
.container>.navbar-header {
height: 45px;
}
@@ -9,6 +12,30 @@
.navbar-default {
margin-bottom: 0;
}
+.carousel, .slick-list {
+ height: 100px;
+ margin-right: -2px;
+}
+.carousel .item {
+ border: 1px solid #333333;
+ position: relative;
+}
+.carousel .thumb {
+ text-align: center;
+ height: 75px;
+}
+.carousel .descp {
+ position: absolute;
+ bottom: 0;
+ width: 100%;
+}
+#filter-container {
+ background: #f5f5f5;
+ padding: 15px;
+}
+#filter-form {
+ margin-bottom: 0;
+}
/* override nicEditor */
#questionInstance {
background: #ffffff !important;
@@ -33,7 +60,6 @@ body {
background: #ffffff;
}
#header-inner {
-
}
#logo {
width: 25px;
@@ -51,6 +77,31 @@ body {
}
#content{
}
+.question-critic, .answer-critic {
+ padding-left: 0;
+ padding-top: 15px;
+ text-align: center;
+}
+.question-critic {
+ font-size: 1.3em;
+}
+.answer-critic {
+ font-size: 1em;
+}
+.vote {
+ text-decoration: none;
+ color: #cccccc;
+}
+.vote:hover {
+ text-decoration: none;
+ cursor: pointer;
+}
+.voted {
+ color: orange;
+}
+/* .question-wrapper { */
+/* padding-left: 0; */
+/* } */
#content .question {
position: relative;
padding: 15px 0 15px 0;
@@ -175,19 +226,56 @@ table .title a {
.saved {
background: lightgreen;
}
-#content .reply {
+/* .answer-wrapper { */
+/* padding-left: 0px; */
+/* } */
+#content .answer {
position: relative;
border-bottom: 1px solid #f5f5f5;
padding-top: 20px;
padding-bottom: 20px;
margin: 10px 0px;
}
-#content .reply .body {
+#content .answer .body {
}
-#content .reply .user {
+#content .answer .user {
+ position: absolute;
+ right: 0px;
+ bottom: 0px;
padding: 2px 7px;
background: #f5f5f5;
}
+.comments {
+ border-left: 1px solid #cccccc;
+}
+.comments .comment {
+ position: relative;
+ padding: 5px 5px;
+ border-bottom: 1px dotted #cccccc;
+}
+.comments .new-comment {
+ display: none;
+}
+.comments .add-comment {
+ margin: 2px;
+ padding: 1px 2px;
+ color: #000000;
+ background: #f5f5f5;
+}
+.comments .cancel-comment {
+ display: none;
+ margin: 2px;
+ padding: 1px 2px;
+ color: #ffffff;
+ background: #d34836;
+}
+.comments .post-comment {
+ display: none;
+ margin: 2px;
+ padding: 1px 2px;
+ color: #ffffff;
+ background: #42B449;
+}
#footer-wrapper {
max-width: 970px;
margin:0 auto;
@@ -217,7 +305,7 @@ table .title a {
top: 15px;
}
.my-question,
-.my-reply {
+.my-answer {
position: relative;
margin: 10px auto;
padding: 15px;
@@ -225,8 +313,31 @@ table .title a {
background: #f7f7f7;
}
.my-question .date,
-.my-reply .date {
+.my-answer .date {
position: absolute;
right: 5px;
bottom: 5px;
}
+#content .comment {
+ min-height: 50px;
+}
+#content .comment .modify-wrapper {
+ display: none;
+}
+#content .comment .meta {
+ position: absolute;
+ right: 0px;
+ bottom: 0px;
+ font-size: small;
+}
+#content .comment .user {
+ padding: 2px 7px;
+ background: #f5f5f5;
+}
+/* carousel styles */
+.slick-next:before,
+.slick-prev:before,
+.slick-next:after,
+.slick-prev:after {
+ color: #a26dc8;
+}
diff --git a/static/website/images/100x75.gif b/static/website/images/100x75.gif
new file mode 100644
index 0000000..b867847
--- /dev/null
+++ b/static/website/images/100x75.gif
Binary files differ
diff --git a/static/website/images/200px-Latex_logo_bw.gif b/static/website/images/200px-Latex_logo_bw.gif
new file mode 100644
index 0000000..89fc6e5
--- /dev/null
+++ b/static/website/images/200px-Latex_logo_bw.gif
Binary files differ
diff --git a/static/website/images/400px-LibreOffice_icons_256.png b/static/website/images/400px-LibreOffice_icons_256.png
new file mode 100644
index 0000000..e689ea0
--- /dev/null
+++ b/static/website/images/400px-LibreOffice_icons_256.png
Binary files differ
diff --git a/static/website/images/Advanced-C++.jpg b/static/website/images/Advanced-C++.jpg
new file mode 100644
index 0000000..4550d61
--- /dev/null
+++ b/static/website/images/Advanced-C++.jpg
Binary files differ
diff --git a/static/website/images/Advanced-C++.png b/static/website/images/Advanced-C++.png
new file mode 100644
index 0000000..5f41a18
--- /dev/null
+++ b/static/website/images/Advanced-C++.png
Binary files differ
diff --git a/static/website/images/BASH.jpg b/static/website/images/BASH.jpg
new file mode 100644
index 0000000..9d29c7e
--- /dev/null
+++ b/static/website/images/BASH.jpg
Binary files differ
diff --git a/static/website/images/BASH.png b/static/website/images/BASH.png
new file mode 100644
index 0000000..95b49c2
--- /dev/null
+++ b/static/website/images/BASH.png
Binary files differ
diff --git a/static/website/images/Blender.jpg b/static/website/images/Blender.jpg
new file mode 100644
index 0000000..14e8734
--- /dev/null
+++ b/static/website/images/Blender.jpg
Binary files differ
diff --git a/static/website/images/C-and-C++.jpg b/static/website/images/C-and-C++.jpg
new file mode 100644
index 0000000..b1e972b
--- /dev/null
+++ b/static/website/images/C-and-C++.jpg
Binary files differ
diff --git a/static/website/images/CellDesigner.gif b/static/website/images/CellDesigner.gif
new file mode 100644
index 0000000..b345547
--- /dev/null
+++ b/static/website/images/CellDesigner.gif
Binary files differ
diff --git a/static/website/images/CellDesigner.jpg b/static/website/images/CellDesigner.jpg
new file mode 100644
index 0000000..17f9d00
--- /dev/null
+++ b/static/website/images/CellDesigner.jpg
Binary files differ
diff --git a/static/website/images/Digital-Divide.gif b/static/website/images/Digital-Divide.gif
new file mode 100644
index 0000000..044a641
--- /dev/null
+++ b/static/website/images/Digital-Divide.gif
Binary files differ
diff --git a/static/website/images/Digital-Divide.jpg b/static/website/images/Digital-Divide.jpg
new file mode 100644
index 0000000..e6595cf
--- /dev/null
+++ b/static/website/images/Digital-Divide.jpg
Binary files differ
diff --git a/static/website/images/Drupal.jpg b/static/website/images/Drupal.jpg
new file mode 100644
index 0000000..a01f8bc
--- /dev/null
+++ b/static/website/images/Drupal.jpg
Binary files differ
diff --git a/static/website/images/Firefox.jpg b/static/website/images/Firefox.jpg
new file mode 100644
index 0000000..189daf4
--- /dev/null
+++ b/static/website/images/Firefox.jpg
Binary files differ
diff --git a/static/website/images/GChemPaing.jpg b/static/website/images/GChemPaing.jpg
new file mode 100644
index 0000000..f1c7d20
--- /dev/null
+++ b/static/website/images/GChemPaing.jpg
Binary files differ
diff --git a/static/website/images/GChemPaint.jpg b/static/website/images/GChemPaint.jpg
new file mode 100644
index 0000000..f1c7d20
--- /dev/null
+++ b/static/website/images/GChemPaint.jpg
Binary files differ
diff --git a/static/website/images/GIMP.jpg b/static/website/images/GIMP.jpg
new file mode 100644
index 0000000..af6b211
--- /dev/null
+++ b/static/website/images/GIMP.jpg
Binary files differ
diff --git a/static/website/images/GNS3.jpg b/static/website/images/GNS3.jpg
new file mode 100644
index 0000000..7656f84
--- /dev/null
+++ b/static/website/images/GNS3.jpg
Binary files differ
diff --git a/static/website/images/GNUstep_logo.svg b/static/website/images/GNUstep_logo.svg
new file mode 100644
index 0000000..4ad5e89
--- /dev/null
+++ b/static/website/images/GNUstep_logo.svg
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Sodipodi ("http://www.sodipodi.com/") -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ id="svg888"
+ sodipodi:version="0.31"
+ width="600"
+ height="600"
+ sodipodi:docname="gnustep-logo.svg"
+ version="1.1"
+ inkscape:version="0.48.3.1 r9886">
+ <metadata
+ id="metadata10">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <defs
+ id="defs890" />
+ <sodipodi:namedview
+ id="base"
+ showgrid="false"
+ inkscape:zoom="1.3666667"
+ inkscape:cx="300"
+ inkscape:cy="300"
+ inkscape:window-width="1110"
+ inkscape:window-height="999"
+ inkscape:window-x="66"
+ inkscape:window-y="52"
+ inkscape:window-maximized="0"
+ inkscape:current-layer="svg888" />
+ <path
+ style="font-size:12px;fill-rule:evenodd;stroke-width:1pt"
+ d="M 298.65625,49.999996 C 161.40808,49.999996 50,161.37552 50,298.62499 c 0,63.21343 23.65869,120.92593 62.5625,164.8125 l 102.59375,-0.5625 0.46875,-166.96875 166.5,0 0.90625,-164.68749 99.59375,0.25 C 437.13239,81.437336 371.55407,49.999996 298.65625,49.999996 z M 482.625,131.46875 c 40.15917,44.16586 64.65625,102.80469 64.65625,167.15624 0,137.24504 -111.37572,248.65626 -248.625,248.65626 -74.0333,0 -140.53204,-32.44655 -186.09375,-83.84376 L 51.375,463.78124 52.28125,550 550,549.53125 l -1.8125,-417.875 -65.5625,-0.1875 z"
+ id="path148"
+ inkscape:connector-curvature="0" />
+</svg>
diff --git a/static/website/images/GSchem.gif b/static/website/images/GSchem.gif
new file mode 100644
index 0000000..afc0828
--- /dev/null
+++ b/static/website/images/GSchem.gif
Binary files differ
diff --git a/static/website/images/GSchem.jpg b/static/website/images/GSchem.jpg
new file mode 100644
index 0000000..e0cf4e1
--- /dev/null
+++ b/static/website/images/GSchem.jpg
Binary files differ
diff --git a/static/website/images/GeoGebra-for-Engineering-drawing.jpg b/static/website/images/GeoGebra-for-Engineering-drawing.jpg
new file mode 100644
index 0000000..3ff0a5e
--- /dev/null
+++ b/static/website/images/GeoGebra-for-Engineering-drawing.jpg
Binary files differ
diff --git a/static/website/images/Geogebra.jpg b/static/website/images/Geogebra.jpg
new file mode 100644
index 0000000..3ff0a5e
--- /dev/null
+++ b/static/website/images/Geogebra.jpg
Binary files differ
diff --git a/static/website/images/Java-Business-Application.gif b/static/website/images/Java-Business-Application.gif
new file mode 100644
index 0000000..ae6769a
--- /dev/null
+++ b/static/website/images/Java-Business-Application.gif
Binary files differ
diff --git a/static/website/images/Java-Business-Application.jpg b/static/website/images/Java-Business-Application.jpg
new file mode 100644
index 0000000..e8046e4
--- /dev/null
+++ b/static/website/images/Java-Business-Application.jpg
Binary files differ
diff --git a/static/website/images/Java.jpg b/static/website/images/Java.jpg
new file mode 100644
index 0000000..9934a4a
--- /dev/null
+++ b/static/website/images/Java.jpg
Binary files differ
diff --git a/static/website/images/Java_logo.png b/static/website/images/Java_logo.png
new file mode 100644
index 0000000..2114751
--- /dev/null
+++ b/static/website/images/Java_logo.png
Binary files differ
diff --git a/static/website/images/KTouch.jpg b/static/website/images/KTouch.jpg
new file mode 100644
index 0000000..4221d96
--- /dev/null
+++ b/static/website/images/KTouch.jpg
Binary files differ
diff --git a/static/website/images/KTurtle.jpg b/static/website/images/KTurtle.jpg
new file mode 100644
index 0000000..733e2c1
--- /dev/null
+++ b/static/website/images/KTurtle.jpg
Binary files differ
diff --git a/static/website/images/KTurtle_logo.png b/static/website/images/KTurtle_logo.png
new file mode 100644
index 0000000..5dea09b
--- /dev/null
+++ b/static/website/images/KTurtle_logo.png
Binary files differ
diff --git a/static/website/images/KiCad.jpg b/static/website/images/KiCad.jpg
new file mode 100644
index 0000000..8df8ac0
--- /dev/null
+++ b/static/website/images/KiCad.jpg
Binary files differ
diff --git a/static/website/images/Kicad_logo_new.png b/static/website/images/Kicad_logo_new.png
new file mode 100644
index 0000000..f28742d
--- /dev/null
+++ b/static/website/images/Kicad_logo_new.png
Binary files differ
diff --git a/static/website/images/LaTeX.jpg b/static/website/images/LaTeX.jpg
new file mode 100644
index 0000000..8fb73db
--- /dev/null
+++ b/static/website/images/LaTeX.jpg
Binary files differ
diff --git a/static/website/images/LibreOffice-Suite-Base.jpg b/static/website/images/LibreOffice-Suite-Base.jpg
new file mode 100644
index 0000000..0d9816a
--- /dev/null
+++ b/static/website/images/LibreOffice-Suite-Base.jpg
Binary files differ
diff --git a/static/website/images/LibreOffice-Suite-Calc.jpg b/static/website/images/LibreOffice-Suite-Calc.jpg
new file mode 100644
index 0000000..51d6cc0
--- /dev/null
+++ b/static/website/images/LibreOffice-Suite-Calc.jpg
Binary files differ
diff --git a/static/website/images/LibreOffice-Suite-Draw.jpg b/static/website/images/LibreOffice-Suite-Draw.jpg
new file mode 100644
index 0000000..9c42a88
--- /dev/null
+++ b/static/website/images/LibreOffice-Suite-Draw.jpg
Binary files differ
diff --git a/static/website/images/LibreOffice-Suite-Impress.jpg b/static/website/images/LibreOffice-Suite-Impress.jpg
new file mode 100644
index 0000000..ce82703
--- /dev/null
+++ b/static/website/images/LibreOffice-Suite-Impress.jpg
Binary files differ
diff --git a/static/website/images/LibreOffice-Suite-Math.jpg b/static/website/images/LibreOffice-Suite-Math.jpg
new file mode 100644
index 0000000..b33de64
--- /dev/null
+++ b/static/website/images/LibreOffice-Suite-Math.jpg
Binary files differ
diff --git a/static/website/images/LibreOffice-Suite-Writer.jpg b/static/website/images/LibreOffice-Suite-Writer.jpg
new file mode 100644
index 0000000..adce0fb
--- /dev/null
+++ b/static/website/images/LibreOffice-Suite-Writer.jpg
Binary files differ
diff --git a/static/website/images/Linux.jpg b/static/website/images/Linux.jpg
new file mode 100644
index 0000000..491bddb
--- /dev/null
+++ b/static/website/images/Linux.jpg
Binary files differ
diff --git a/static/website/images/Linux_logo.png b/static/website/images/Linux_logo.png
new file mode 100644
index 0000000..837f706
--- /dev/null
+++ b/static/website/images/Linux_logo.png
Binary files differ
diff --git a/static/website/images/Netbeans.jpg b/static/website/images/Netbeans.jpg
new file mode 100644
index 0000000..66c5753
--- /dev/null
+++ b/static/website/images/Netbeans.jpg
Binary files differ
diff --git a/static/website/images/Ngspice.jpg b/static/website/images/Ngspice.jpg
new file mode 100644
index 0000000..a319e31
--- /dev/null
+++ b/static/website/images/Ngspice.jpg
Binary files differ
diff --git a/static/website/images/OpenFOAM.jpg b/static/website/images/OpenFOAM.jpg
new file mode 100644
index 0000000..7e20f33
--- /dev/null
+++ b/static/website/images/OpenFOAM.jpg
Binary files differ
diff --git a/static/website/images/OpenFoam-Logo.gif b/static/website/images/OpenFoam-Logo.gif
new file mode 100644
index 0000000..baf895f
--- /dev/null
+++ b/static/website/images/OpenFoam-Logo.gif
Binary files differ
diff --git a/static/website/images/Orca.jpg b/static/website/images/Orca.jpg
new file mode 100644
index 0000000..cf7797c
--- /dev/null
+++ b/static/website/images/Orca.jpg
Binary files differ
diff --git a/static/website/images/Orca_icon.svg b/static/website/images/Orca_icon.svg
new file mode 100644
index 0000000..64e6a82
--- /dev/null
+++ b/static/website/images/Orca_icon.svg
@@ -0,0 +1,220 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.0" width="48" height="48" id="svg5596">
+ <defs id="defs5599">
+ <linearGradient x1="19.394735" y1="30.001331" x2="22.225447" y2="32.643337" id="linearGradient12663" xlink:href="#linearGradient6939" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0.984808,0.173648,-0.173648,0.984808,-6.57769,0.52398)"/>
+ <linearGradient id="linearGradient11599">
+ <stop style="stop-color:#5b5b5b;stop-opacity:1" offset="0" id="stop11601"/>
+ <stop style="stop-color:#979797;stop-opacity:1" offset="0.5" id="stop11603"/>
+ <stop style="stop-color:#454545;stop-opacity:1" offset="1" id="stop11605"/>
+ </linearGradient>
+ <linearGradient id="linearGradient11573">
+ <stop style="stop-color:#ef2929;stop-opacity:1" offset="0" id="stop11575"/>
+ <stop style="stop-color:#f79090;stop-opacity:1" offset="0.5" id="stop11585"/>
+ <stop style="stop-color:#ef2929;stop-opacity:1" offset="1" id="stop11577"/>
+ </linearGradient>
+ <linearGradient id="linearGradient3394">
+ <stop style="stop-color:#cc0000;stop-opacity:0.49803922" offset="0" id="stop3402"/>
+ <stop style="stop-color:#cc0000;stop-opacity:1" offset="1" id="stop3404"/>
+ </linearGradient>
+ <linearGradient id="linearGradient3243">
+ <stop style="stop-color:#ef2929;stop-opacity:1" offset="0" id="stop3245"/>
+ <stop style="stop-color:#efc8c8;stop-opacity:1" offset="0.5" id="stop3253"/>
+ <stop style="stop-color:#ef2929;stop-opacity:1" offset="1" id="stop3247"/>
+ </linearGradient>
+ <linearGradient id="linearGradient3229">
+ <stop style="stop-color:#ef2929;stop-opacity:1" offset="0" id="stop3231"/>
+ <stop style="stop-color:#f35e5e;stop-opacity:1" offset="1" id="stop3241"/>
+ </linearGradient>
+ <linearGradient id="linearGradient3197">
+ <stop style="stop-color:#cc0000;stop-opacity:1" offset="0" id="stop3199"/>
+ <stop style="stop-color:#cc0000;stop-opacity:0.49803922" offset="0" id="stop3205"/>
+ <stop style="stop-color:#cc0000;stop-opacity:1" offset="1" id="stop3201"/>
+ </linearGradient>
+ <linearGradient x1="32.169682" y1="32.340691" x2="36.310467" y2="37.614323" id="linearGradient2552" xlink:href="#linearGradient2215" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0.955799,0.125613,-0.13219,1.005843,8.433071,-4.87925)"/>
+ <linearGradient x1="16.920895" y1="41.527054" x2="14.717065" y2="27.556486" id="linearGradient4158" xlink:href="#linearGradient4152" gradientUnits="userSpaceOnUse" gradientTransform="translate(-0.386129,-2.59755)"/>
+ <linearGradient id="linearGradient4199">
+ <stop style="stop-color:#ffffff;stop-opacity:0.69072163" offset="0" id="stop4201"/>
+ <stop style="stop-color:#000000;stop-opacity:0" offset="1" id="stop4203"/>
+ </linearGradient>
+ <linearGradient x1="5.5588484" y1="8.7893238" x2="26.936853" y2="48.565983" id="linearGradient4197" xlink:href="#linearGradient4199" gradientUnits="userSpaceOnUse" gradientTransform="matrix(1.015688,0,0,1,-0.427129,-2.59755)"/>
+ <linearGradient id="linearGradient4152">
+ <stop style="stop-color:#788492;stop-opacity:1" offset="0" id="stop4154"/>
+ <stop style="stop-color:#fafafa;stop-opacity:1" offset="1" id="stop4156"/>
+ </linearGradient>
+ <linearGradient x1="5.4860573" y1="32.173634" x2="12.296931" y2="27.665829" id="linearGradient4185" xlink:href="#linearGradient4152" gradientUnits="userSpaceOnUse" gradientTransform="matrix(1.290919,0,0,1.173295,-3.854317,-8.380223)"/>
+ <linearGradient x1="34.868965" y1="39.944828" x2="34.868965" y2="43.475861" id="linearGradient4273" xlink:href="#linearGradient4242" gradientUnits="userSpaceOnUse" gradientTransform="translate(-0.386129,-2.59755)"/>
+ <linearGradient x1="36.634483" y1="38.124138" x2="36.634483" y2="42.427586" id="linearGradient4265" xlink:href="#linearGradient4242" gradientUnits="userSpaceOnUse" gradientTransform="translate(-0.386129,-2.59755)"/>
+ <linearGradient x1="38.896549" y1="38.482758" x2="42.427586" y2="38.482758" id="linearGradient4256" xlink:href="#linearGradient4242" gradientUnits="userSpaceOnUse" gradientTransform="translate(-0.386129,-2.59755)"/>
+ <linearGradient id="linearGradient4242">
+ <stop style="stop-color:#000000;stop-opacity:1" offset="0" id="stop4244"/>
+ <stop style="stop-color:#000000;stop-opacity:0" offset="1" id="stop4246"/>
+ </linearGradient>
+ <linearGradient x1="40.496552" y1="37.848274" x2="44.193104" y2="37.848274" id="linearGradient4248" xlink:href="#linearGradient4242" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0.864739,0,0,0.753105,5.591471,7.01265)"/>
+ <linearGradient x1="-5.2845793" y1="19.362175" x2="33.728188" y2="66.499512" id="linearGradient4146" xlink:href="#linearGradient2949" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0.943596,0,0,0.963374,6.792471,4.03365)"/>
+ <linearGradient id="linearGradient2215">
+ <stop style="stop-color:#000000;stop-opacity:1" offset="0" id="stop2217"/>
+ <stop style="stop-color:#505050;stop-opacity:1" offset="1" id="stop2219"/>
+ </linearGradient>
+ <linearGradient x1="26.247757" y1="38.03194" x2="23.782515" y2="36.457325" id="linearGradient4277" xlink:href="#linearGradient2215" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0,0.967422,0.946165,0,-16.09433,2.21785)"/>
+ <linearGradient id="linearGradient2949">
+ <stop style="stop-color:#ffffff;stop-opacity:0.45038167" offset="0" id="stop2951"/>
+ <stop style="stop-color:#ffffff;stop-opacity:0.31297711" offset="1" id="stop2953"/>
+ </linearGradient>
+ <linearGradient x1="29.425014" y1="33.593369" x2="43.14069" y2="38.189564" id="linearGradient4301" xlink:href="#linearGradient2949" gradientUnits="userSpaceOnUse" gradientTransform="translate(-14.76113,-7.34755)"/>
+ <linearGradient id="linearGradient2879">
+ <stop style="stop-color:#000000;stop-opacity:0.17557251" offset="0" id="stop2881"/>
+ <stop style="stop-color:#000000;stop-opacity:0" offset="1" id="stop2883"/>
+ </linearGradient>
+ <radialGradient cx="20.152544" cy="33.636894" r="15.291184" fx="20.152544" fy="33.636894" id="radialGradient4312" xlink:href="#linearGradient2879" gradientUnits="userSpaceOnUse" gradientTransform="matrix(1,0,0,0.257225,0,24.98463)"/>
+ <linearGradient x1="52.717937" y1="2.3161638" x2="67.465988" y2="2.3161638" id="linearGradient7025" xlink:href="#linearGradient6721" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0.862482,0,0,0.580718,-16.25697,11.01348)"/>
+ <linearGradient x1="53.168766" y1="24.244797" x2="69.690994" y2="24.244797" id="linearGradient7020" xlink:href="#linearGradient6651" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0.71944,0,0,0.718914,-7.696252,9.471728)"/>
+ <linearGradient x1="61.871845" y1="29.615223" x2="61.871845" y2="41.459263" id="linearGradient7017" xlink:href="#linearGradient6629" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0.888619,0,0,0.718914,-18.29768,9.471728)"/>
+ <linearGradient x1="49.853039" y1="64.259621" x2="62.768223" y2="64.259621" id="linearGradient7014" xlink:href="#linearGradient6748" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0.718914,0,0,0.718914,-1.897103,-22.42481)"/>
+ <linearGradient x1="60.168766" y1="40.119797" x2="60.440994" y2="43.869797" id="linearGradient7010" xlink:href="#linearGradient6651" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0.737307,0,0,0.770854,-8.532023,7.121636)"/>
+ <linearGradient x1="48.25" y1="54.75" x2="48.25" y2="71.25" id="linearGradient7005" xlink:href="#linearGradient6835" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0.718914,0,0,0.718914,-1.897103,-20.68606)"/>
+ <radialGradient cx="26.78167" cy="42.343147" r="14.407301" fx="26.78167" fy="42.343147" id="radialGradient6903" xlink:href="#linearGradient6975" gradientUnits="userSpaceOnUse" gradientTransform="matrix(1,0,0,0.282209,0,30.39355)"/>
+ <linearGradient x1="13.236155" y1="37.752247" x2="7.7521091" y2="42.282146" id="linearGradient2452" xlink:href="#linearGradient2446" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0.852298,0,0,0.852298,-1.675107,3.753977)"/>
+ <radialGradient cx="26.78167" cy="42.343147" r="14.407301" fx="26.78167" fy="42.343147" id="radialGradient6981" xlink:href="#linearGradient6975" gradientUnits="userSpaceOnUse" gradientTransform="matrix(1,0,0,0.282209,0,30.39355)"/>
+ <radialGradient cx="15.415101" cy="35.356506" r="7.5791559" fx="15.415101" fy="35.356506" id="radialGradient6969" xlink:href="#linearGradient6963" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0.994655,0,0,0.969322,-4.583017,0.165919)"/>
+ <linearGradient x1="28.058632" y1="18.867767" x2="33.436985" y2="23.742767" id="linearGradient6957" xlink:href="#linearGradient6951" gradientUnits="userSpaceOnUse" gradientTransform="translate(-3.90695,-1.802856)"/>
+ <linearGradient x1="19.394735" y1="30.001331" x2="23.109331" y2="33.438831" id="linearGradient6945" xlink:href="#linearGradient6939" gradientUnits="userSpaceOnUse" gradientTransform="translate(-53.05087,38.14868)"/>
+ <linearGradient id="linearGradient6939">
+ <stop style="stop-color:#dddddd;stop-opacity:1" offset="0" id="stop6941"/>
+ <stop style="stop-color:#ffffff;stop-opacity:1" offset="0.33333334" id="stop6947"/>
+ <stop style="stop-color:#b7b7b7;stop-opacity:1" offset="0.66666669" id="stop6949"/>
+ <stop style="stop-color:#dddddd;stop-opacity:1" offset="1" id="stop6943"/>
+ </linearGradient>
+ <linearGradient id="linearGradient6951">
+ <stop style="stop-color:#6e3d09;stop-opacity:1" offset="0" id="stop6953"/>
+ <stop style="stop-color:#ea8113;stop-opacity:1" offset="0.24242425" id="stop6959"/>
+ <stop style="stop-color:#5c3307;stop-opacity:1" offset="0.62121212" id="stop6961"/>
+ <stop style="stop-color:#e07c12;stop-opacity:1" offset="1" id="stop6955"/>
+ </linearGradient>
+ <linearGradient id="linearGradient6963">
+ <stop style="stop-color:#696969;stop-opacity:1" offset="0" id="stop6965"/>
+ <stop style="stop-color:#000000;stop-opacity:1" offset="1" id="stop6967"/>
+ </linearGradient>
+ <linearGradient id="linearGradient6975">
+ <stop style="stop-color:#000000;stop-opacity:1" offset="0" id="stop6977"/>
+ <stop style="stop-color:#000000;stop-opacity:0" offset="1" id="stop6979"/>
+ </linearGradient>
+ <linearGradient id="linearGradient2446">
+ <stop style="stop-color:#ffffff;stop-opacity:1" offset="0" id="stop2448"/>
+ <stop style="stop-color:#ffffff;stop-opacity:0" offset="1" id="stop2450"/>
+ </linearGradient>
+ <linearGradient id="linearGradient6629">
+ <stop style="stop-color:#aeaeae;stop-opacity:1" offset="0" id="stop6631"/>
+ <stop style="stop-color:#c4c4c4;stop-opacity:0" offset="1" id="stop6633"/>
+ </linearGradient>
+ <linearGradient id="linearGradient6651">
+ <stop style="stop-color:#f2f2f2;stop-opacity:1" offset="0" id="stop6653"/>
+ <stop style="stop-color:#c3c3c3;stop-opacity:1" offset="1" id="stop6655"/>
+ </linearGradient>
+ <linearGradient id="linearGradient6721">
+ <stop style="stop-color:#729fcf;stop-opacity:1" offset="0" id="stop6723"/>
+ <stop style="stop-color:#3c74b1;stop-opacity:1" offset="1" id="stop6725"/>
+ </linearGradient>
+ <linearGradient id="linearGradient6748">
+ <stop style="stop-color:#729fcf;stop-opacity:1" offset="0" id="stop6750"/>
+ <stop style="stop-color:#2b5582;stop-opacity:1" offset="1" id="stop6752"/>
+ </linearGradient>
+ <linearGradient id="linearGradient6835">
+ <stop style="stop-color:#ffffff;stop-opacity:1" offset="0" id="stop6837"/>
+ <stop style="stop-color:#ffffff;stop-opacity:0" offset="1" id="stop6839"/>
+ </linearGradient>
+ <linearGradient x1="19.394735" y1="30.001331" x2="22.225447" y2="32.643337" id="linearGradient2282" xlink:href="#linearGradient6939" gradientUnits="userSpaceOnUse" gradientTransform="translate(38.07104,6.705107)"/>
+ <linearGradient x1="56.162964" y1="41.83876" x2="54.483982" y2="40.247776" id="linearGradient3203" xlink:href="#linearGradient3197" gradientUnits="userSpaceOnUse"/>
+ <linearGradient x1="19.394735" y1="30.001331" x2="22.225447" y2="32.643337" id="linearGradient3211" xlink:href="#linearGradient6939" gradientUnits="userSpaceOnUse" gradientTransform="translate(38.07104,6.705107)"/>
+ <linearGradient x1="56.162964" y1="41.83876" x2="54.483982" y2="40.247776" id="linearGradient3213" xlink:href="#linearGradient3197" gradientUnits="userSpaceOnUse"/>
+ <linearGradient x1="54.837135" y1="39.805828" x2="56.428524" y2="41.308434" id="linearGradient3249" xlink:href="#linearGradient3243" gradientUnits="userSpaceOnUse"/>
+ <linearGradient x1="12.813026" y1="32.056629" x2="15.119371" y2="34.001175" id="linearGradient3263" xlink:href="#linearGradient3243" gradientUnits="userSpaceOnUse"/>
+ <linearGradient x1="54.837135" y1="39.805828" x2="56.428524" y2="41.308434" id="linearGradient3266" xlink:href="#linearGradient3243" gradientUnits="userSpaceOnUse" gradientTransform="translate(-51.85143,3.42342)"/>
+ <linearGradient x1="19.394735" y1="30.001331" x2="22.225447" y2="32.643337" id="linearGradient3269" xlink:href="#linearGradient6939" gradientUnits="userSpaceOnUse" gradientTransform="translate(-13.78039,10.12853)"/>
+ <linearGradient x1="2.1018243" y1="43.936359" x2="4.1351514" y2="45.880901" id="linearGradient11844" xlink:href="#linearGradient11573" gradientUnits="userSpaceOnUse"/>
+ <linearGradient x1="19.268993" y1="25.539364" x2="21.398565" y2="27.616491" id="linearGradient11846" xlink:href="#linearGradient11573" gradientUnits="userSpaceOnUse" gradientTransform="translate(0.374275,-0.411242)"/>
+ <linearGradient x1="19.394735" y1="30.001331" x2="22.225447" y2="32.643337" id="linearGradient11848" xlink:href="#linearGradient6939" gradientUnits="userSpaceOnUse" gradientTransform="translate(-13.78039,10.12853)"/>
+ <linearGradient x1="27.847828" y1="16.542765" x2="29.623844" y2="18.266338" id="linearGradient11850" xlink:href="#linearGradient11573" gradientUnits="userSpaceOnUse" gradientTransform="translate(1.117749,-1.179036)"/>
+ <linearGradient x1="19.394735" y1="30.001331" x2="22.225447" y2="32.643337" id="linearGradient11852" xlink:href="#linearGradient6939" gradientUnits="userSpaceOnUse" gradientTransform="translate(7.629341,-13.05859)"/>
+ <linearGradient x1="19.394735" y1="30.001331" x2="22.225447" y2="32.643337" id="linearGradient11854" xlink:href="#linearGradient6939" gradientUnits="userSpaceOnUse" gradientTransform="translate(3.014336,-8.04609)"/>
+ <linearGradient x1="27.847828" y1="16.542765" x2="29.623844" y2="18.266338" id="linearGradient11856" xlink:href="#linearGradient11599" gradientUnits="userSpaceOnUse" gradientTransform="translate(11.0575,-11.78)"/>
+ <linearGradient x1="52.717937" y1="2.3161638" x2="67.465988" y2="2.3161638" id="linearGradient14628" xlink:href="#linearGradient6721" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0.862482,0,0,0.580718,-16.25697,11.01348)"/>
+ <linearGradient x1="53.168766" y1="24.244797" x2="69.690994" y2="24.244797" id="linearGradient14626" xlink:href="#linearGradient6651" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0.71944,0,0,0.718914,-7.696252,9.471728)"/>
+ <linearGradient x1="61.871845" y1="29.615223" x2="61.871845" y2="41.459263" id="linearGradient14624" xlink:href="#linearGradient6629" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0.888619,0,0,0.718914,-18.29768,9.471728)"/>
+ <linearGradient x1="49.853039" y1="64.259621" x2="62.768223" y2="64.259621" id="linearGradient14622" xlink:href="#linearGradient6748" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0.718914,0,0,0.718914,-1.897103,-22.42481)"/>
+ <linearGradient x1="60.168766" y1="40.119797" x2="60.440994" y2="43.869797" id="linearGradient14620" xlink:href="#linearGradient6651" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0.737307,0,0,0.770854,-8.532023,7.121636)"/>
+ <linearGradient x1="48.25" y1="54.75" x2="48.25" y2="71.25" id="linearGradient14618" xlink:href="#linearGradient6835" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0.718914,0,0,0.718914,-1.897103,-20.68606)"/>
+ <radialGradient cx="26.78167" cy="42.343147" r="14.407301" fx="26.78167" fy="42.343147" id="radialGradient14616" xlink:href="#linearGradient6975" gradientUnits="userSpaceOnUse" gradientTransform="matrix(1,0,0,0.282209,0,30.39355)"/>
+ <linearGradient x1="13.236155" y1="37.752247" x2="7.7521091" y2="42.282146" id="linearGradient14614" xlink:href="#linearGradient2446" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0.852298,0,0,0.852298,-1.675107,3.753977)"/>
+ <radialGradient cx="26.78167" cy="42.343147" r="14.407301" fx="26.78167" fy="42.343147" id="radialGradient14612" xlink:href="#linearGradient6975" gradientUnits="userSpaceOnUse" gradientTransform="matrix(1,0,0,0.282209,0,30.39355)"/>
+ <radialGradient cx="15.415101" cy="35.356506" r="7.5791559" fx="15.415101" fy="35.356506" id="radialGradient14610" xlink:href="#linearGradient6963" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0.994655,0,0,0.969322,-4.583017,0.165919)"/>
+ <linearGradient x1="28.058632" y1="18.867767" x2="33.436985" y2="23.742767" id="linearGradient14608" xlink:href="#linearGradient6951" gradientUnits="userSpaceOnUse" gradientTransform="translate(-3.90695,-1.802856)"/>
+ <linearGradient x1="19.394735" y1="30.001331" x2="23.109331" y2="33.438831" id="linearGradient14606" xlink:href="#linearGradient6939" gradientUnits="userSpaceOnUse" gradientTransform="translate(-3.90695,-1.802856)"/>
+ <linearGradient id="linearGradient14596">
+ <stop style="stop-color:#bdbdbd;stop-opacity:1" offset="0" id="stop14598"/>
+ <stop style="stop-color:#e2e2e2;stop-opacity:1" offset="0.33333334" id="stop14600"/>
+ <stop style="stop-color:#a3a3a3;stop-opacity:1" offset="0.66666669" id="stop14602"/>
+ <stop style="stop-color:#dddddd;stop-opacity:1" offset="1" id="stop14604"/>
+ </linearGradient>
+ <linearGradient id="linearGradient14586">
+ <stop style="stop-color:#6e3d09;stop-opacity:1" offset="0" id="stop14588"/>
+ <stop style="stop-color:#ea8113;stop-opacity:1" offset="0.24242425" id="stop14590"/>
+ <stop style="stop-color:#5c3307;stop-opacity:1" offset="0.62121212" id="stop14592"/>
+ <stop style="stop-color:#e07c12;stop-opacity:1" offset="1" id="stop14594"/>
+ </linearGradient>
+ <linearGradient id="linearGradient14580">
+ <stop style="stop-color:#696969;stop-opacity:1" offset="0" id="stop14582"/>
+ <stop style="stop-color:#000000;stop-opacity:1" offset="1" id="stop14584"/>
+ </linearGradient>
+ <linearGradient id="linearGradient14562">
+ <stop style="stop-color:#aeaeae;stop-opacity:1" offset="0" id="stop14564"/>
+ <stop style="stop-color:#c4c4c4;stop-opacity:0" offset="1" id="stop14566"/>
+ </linearGradient>
+ <linearGradient id="linearGradient14556">
+ <stop style="stop-color:#f2f2f2;stop-opacity:1" offset="0" id="stop14558"/>
+ <stop style="stop-color:#c3c3c3;stop-opacity:1" offset="1" id="stop14560"/>
+ </linearGradient>
+ <linearGradient id="linearGradient14550">
+ <stop style="stop-color:#729fcf;stop-opacity:1" offset="0" id="stop14552"/>
+ <stop style="stop-color:#3c74b1;stop-opacity:1" offset="1" id="stop14554"/>
+ </linearGradient>
+ <linearGradient id="linearGradient14544">
+ <stop style="stop-color:#729fcf;stop-opacity:1" offset="0" id="stop14546"/>
+ <stop style="stop-color:#2b5582;stop-opacity:1" offset="1" id="stop14548"/>
+ </linearGradient>
+ <linearGradient x1="19.394735" y1="30.001331" x2="22.225447" y2="32.643337" id="linearGradient14954" xlink:href="#linearGradient6939" gradientUnits="userSpaceOnUse" gradientTransform="translate(4.1746,-9.271088)"/>
+ <linearGradient x1="2.1018243" y1="43.936359" x2="4.1351514" y2="45.880901" id="linearGradient3403" xlink:href="#linearGradient11573" gradientUnits="userSpaceOnUse"/>
+ <linearGradient x1="19.268993" y1="25.539364" x2="21.398565" y2="27.616491" id="linearGradient3405" xlink:href="#linearGradient11573" gradientUnits="userSpaceOnUse" gradientTransform="translate(0.374275,-0.411242)"/>
+ <linearGradient x1="19.394735" y1="30.001331" x2="22.225447" y2="32.643337" id="linearGradient3407" xlink:href="#linearGradient6939" gradientUnits="userSpaceOnUse" gradientTransform="translate(-13.78039,10.12853)"/>
+ <linearGradient x1="27.847828" y1="16.542765" x2="29.623844" y2="18.266338" id="linearGradient3409" xlink:href="#linearGradient11573" gradientUnits="userSpaceOnUse" gradientTransform="translate(1.117749,-1.179036)"/>
+ <linearGradient x1="19.394735" y1="30.001331" x2="22.225447" y2="32.643337" id="linearGradient3411" xlink:href="#linearGradient6939" gradientUnits="userSpaceOnUse" gradientTransform="translate(7.629341,-13.05859)"/>
+ <linearGradient x1="19.394735" y1="30.001331" x2="22.225447" y2="32.643337" id="linearGradient3413" xlink:href="#linearGradient6939" gradientUnits="userSpaceOnUse" gradientTransform="translate(4.1746,-9.271088)"/>
+ <linearGradient x1="27.847828" y1="16.542765" x2="29.623844" y2="18.266338" id="linearGradient3415" xlink:href="#linearGradient11599" gradientUnits="userSpaceOnUse" gradientTransform="translate(11.0575,-11.78)"/>
+ <linearGradient x1="19.394735" y1="30.001331" x2="22.225447" y2="32.643337" id="linearGradient3417" xlink:href="#linearGradient6939" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0.984808,0.173648,-0.173648,0.984808,-6.57769,0.52398)"/>
+ <linearGradient x1="19.394735" y1="30.001331" x2="22.225447" y2="32.643337" id="linearGradient3421" xlink:href="#linearGradient6939" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0.984808,0.173648,-0.173648,0.984808,-6.57769,0.52398)"/>
+ </defs>
+ <path d="M 1.7363208,32.76676 C 8.3248508,34.7511 17.971871,31.961 22.133911,29.7435 C 30.287021,25.39957 33.685501,31.30328 34.801441,32.05439 C 36.530681,33.53598 31.237641,37.58917 31.573111,40.88925 C 31.759321,42.72109 32.505111,43.61576 32.505111,43.61576 C 33.965331,39.48164 38.580621,41.17748 38.314881,36.8757 C 41.818991,38.85336 42.570681,35.7035 46.636481,36.33108 C 46.061891,35.45605 45.320271,34.15277 43.725911,33.46963 C 42.026491,32.83221 39.153851,32.92116 38.407801,30.75286 C 38.271601,28.30032 38.308721,15.21709 32.388811,11.21743 C 31.523921,9.4752702 32.457261,6.9929501 34.140491,5.2970101 C 35.662491,3.7635101 37.948761,2.3513201 38.731321,1.4507101 C 35.188721,1.4126301 31.659811,2.5223101 28.205141,4.3913401 C 26.403551,5.3660301 24.817171,6.7674501 23.692801,7.2919301 C 13.541991,5.2789001 2.3520908,13.65739 1.2225508,28.3597 C 1.1314008,29.5462 1.1494908,32.39912 1.7363208,32.76676 z " style="fill:url(#linearGradient2552);fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" id="path2498"/>
+ <path d="M 5.2335808,32.81055 C 11.622781,33.50363 18.209491,30.83856 22.270961,28.96994 C 29.345491,25.669 32.552281,29.14676 34.135611,30.66586 C 34.308901,30.89994 34.307271,29.07354 32.433581,27.87203 C 24.899961,24.33752 34.461671,24.30594 33.953881,23.00814 C 33.369651,21.51499 26.991311,22.37165 25.878431,22.75436 C 21.878331,24.12997 20.471841,26.36926 18.438621,26.78615 C 14.693991,27.4985 11.800931,25.476 9.4333807,28.43233 C 5.2947208,33.60023 4.5869808,32.74041 5.2335808,32.81055 z " style="opacity:1;fill:url(#linearGradient4158);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.95343304;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" id="path4148"/>
+ <path d="M 2.2770308,32.01551 C 4.8209308,24.64639 13.446641,25.07661 16.854831,21.56745 C 20.208301,18.11463 23.971781,7.3217801 36.560451,18.71166 C 36.606471,18.75329 34.575411,12.91689 31.738591,10.99031 C 30.909681,9.3119602 24.850741,7.3220301 23.773151,7.8273001 C 13.337511,5.8880001 2.9583508,14.66672 1.8758008,28.91892 C 1.7889808,30.062 1.7146108,31.66134 2.2770308,32.01551 z " style="opacity:1;fill:url(#linearGradient4197);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.95343304;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" id="path4188"/>
+ <path d="M 8.1097416,25.842531 C 7.4359593,24.884336 10.739306,21.488867 11.911822,22.16946 C 12.628902,23.209751 9.601696,27.066888 8.1097416,25.842531 z " style="fill:url(#linearGradient4185);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" id="path4168"/>
+ <path d="M 34.151781,40.87835 L 34.813841,40.38179 L 34.758671,37.34731 L 34.151781,40.87835 z " style="opacity:0.25628142;fill:url(#linearGradient4273);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" id="path4206"/>
+ <path d="M 35.862121,39.83007 L 36.634531,39.44386 L 36.137981,35.52662 L 35.862121,39.83007 z " style="opacity:0.25125631;fill:url(#linearGradient4265);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" id="path4217"/>
+ <path d="M 41.158671,36.9611 L 42.041431,36.63007 L 38.510401,34.80938 L 41.158671,36.9611 z " style="opacity:0.23115575;fill:url(#linearGradient4256);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" id="path4219"/>
+ <path d="M 42.900461,36.32662 L 43.806951,36.07732 L 40.610401,34.70615 L 42.900461,36.32662 z " style="opacity:0.22613065;fill:url(#linearGradient4248);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" id="path4221"/>
+ <path d="M 2.8895108,32.01551 C 8.8412607,33.57361 17.413831,30.88571 21.341101,28.74943 C 29.034351,24.56461 34.981181,30.34046 35.680621,32.03634 C 36.870381,33.64044 34.470411,35.76668 32.930801,38.8575 C 32.140061,40.44493 32.572791,41.39575 32.572791,41.39575 C 33.919401,39.44691 38.212791,40.2735 37.243291,35.16237 C 41.137221,38.06131 42.424171,35.30807 44.721431,35.32427 C 43.991751,34.38754 43.191931,34.35336 42.406261,34.16399 C 40.802691,33.54991 38.483161,33.60527 37.435441,31.04765 C 37.306931,28.68493 37.929421,17.05318 31.636311,11.87419 C 30.555041,10.54939 30.725551,7.9521601 32.405301,5.7286701 C 32.900791,5.0728001 34.849721,3.5095901 35.588151,2.6419701 C 32.510521,3.2240101 31.213591,3.7627101 27.953781,5.5632901 C 26.253811,6.5022701 25.110451,7.7639701 24.049501,8.2692401 C 14.206081,6.5067201 4.6196108,13.42929 2.4047308,27.23954 C 2.2232108,28.37135 2.0706208,31.66134 2.8895108,32.01551 z " style="opacity:1;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient4146);stroke-width:0.95343304;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" id="path4134"/>
+ <g id="g3432">
+ <g transform="matrix(0.984808,0.173648,-0.173648,0.984808,4.319821,-3.493951)" id="g11820">
+ <g transform="translate(3.782059,-4.305959)" id="g3379">
+ <path d="M 3.6678274,43.136096 L 5.3838174,44.716363 C 6.4337554,43.515919 11.191757,38.438712 11.191757,38.438712 L 9.4548369,36.923036 C 9.4548369,36.923036 4.9455924,41.774015 3.6678274,43.136096 z " style="color:#000000;fill:url(#linearGradient3403);fill-opacity:1;fill-rule:nonzero;stroke:#cc0000;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" id="path2292"/>
+ <path d="M 9.3798921,36.977632 L 11.095882,38.557899 C 12.14582,37.357455 32.719517,15.450785 32.719517,15.450785 L 30.982597,13.935109 C 30.982597,13.935109 10.657657,35.615551 9.3798921,36.977632 z " style="color:#000000;fill:url(#linearGradient3407);fill-opacity:1;fill-rule:nonzero;stroke:#888a85;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" id="path6935"/>
+ </g>
+ <path d="M 34.676553,9.7053399 L 36.455043,11.160607 C 37.504981,9.9601639 41.783263,5.5878763 42.1,5.110676 C 43.214868,4.1209793 41.493403,2.3741139 40.30058,3.72 C 39.73371,4.2605973 35.954318,8.3432589 34.676553,9.7053399 z " style="color:#000000;fill:url(#linearGradient3415);fill-opacity:1;fill-rule:nonzero;stroke:#2e3436;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" id="path11595"/>
+ </g>
+ <path d="M 3.1259863,37.385763 C 1.7298033,38.631621 2.6856953,40.157401 4.5414953,39.24 C 4.8993219,39.067037 6.4911218,37.770435 6.4911218,37.770435 L 5.024554,35.956942 C 5.024554,35.956942 4.6208613,36.266256 3.1259863,37.385763 z " style="color:#000000;fill:url(#linearGradient3421);fill-opacity:1;fill-rule:nonzero;stroke:#888a85;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" id="path4782"/>
+ <path d="M 45.38,7.76 C 45.38,7.76 50.38,17.76 45.38,17.76 C 40.38,17.76 45.630004,12.759996 45.38,7.76 z " style="fill:none;fill-rule:evenodd;stroke:#2e3436;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" id="path4784"/>
+ <path d="M 8.8749989 37.75 A 1.2499999 1.2499999 0 1 1 6.3749992,37.75 A 1.2499999 1.2499999 0 1 1 8.8749989 37.75 z" transform="matrix(0.237867,0,0,0.237867,1.543598,29.32319)" style="opacity:0.53333285;color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" id="path2454"/>
+ </g>
+ <path d="M 19.450291,23.22383 C 22.168421,25.03662 28.856191,30.5826 25.680471,31.40984 C 15.059251,31.02011 16.896751,26.26768 14.182961,25.53368 C 12.719161,24.04968 17.982161,22.53604 19.450291,23.22383 z " style="fill:url(#linearGradient4277);fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.96744114;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" id="path4275"/>
+ <path d="M 19.146461,24.13864 C 21.378451,25.77465 26.563631,29.81803 25.199871,30.60107 C 21.104601,30.05266 19.021051,29.4458 17.949761,28.25613 C 16.602891,26.76044 16.164111,25.40127 15.160761,25.03427 C 14.934401,25.05287 17.678331,23.45085 19.146461,24.13864 z " style="opacity:1;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient4301);stroke-width:0.96744114;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" id="path4279"/>
+ <path d="M 35.443728 33.636894 A 15.291184 3.9332814 0 1 1 4.8613596,33.636894 A 15.291184 3.9332814 0 1 1 35.443728 33.636894 z" transform="matrix(1.475993,0,0,0.71076,-6.402967,20.77848)" style="opacity:1;color:#000000;fill:url(#radialGradient4312);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.25;stroke-linecap:butt;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" id="path4310"/>
+</svg> \ No newline at end of file
diff --git a/static/website/images/PERL.jpg b/static/website/images/PERL.jpg
new file mode 100644
index 0000000..5159d78
--- /dev/null
+++ b/static/website/images/PERL.jpg
Binary files differ
diff --git a/static/website/images/PHP-and-MySQL.jpg b/static/website/images/PHP-and-MySQL.jpg
new file mode 100644
index 0000000..d8d7efa
--- /dev/null
+++ b/static/website/images/PHP-and-MySQL.jpg
Binary files differ
diff --git a/static/website/images/Python-Old-Version.jpg b/static/website/images/Python-Old-Version.jpg
new file mode 100644
index 0000000..cf40bb8
--- /dev/null
+++ b/static/website/images/Python-Old-Version.jpg
Binary files differ
diff --git a/static/website/images/Python.jpg b/static/website/images/Python.jpg
new file mode 100644
index 0000000..4023cce
--- /dev/null
+++ b/static/website/images/Python.jpg
Binary files differ
diff --git a/static/website/images/QCad.jpg b/static/website/images/QCad.jpg
new file mode 100644
index 0000000..293046b
--- /dev/null
+++ b/static/website/images/QCad.jpg
Binary files differ
diff --git a/static/website/images/R.jpg b/static/website/images/R.jpg
new file mode 100644
index 0000000..b1fb8da
--- /dev/null
+++ b/static/website/images/R.jpg
Binary files differ
diff --git a/static/website/images/Rlogo.jpg b/static/website/images/Rlogo.jpg
new file mode 100644
index 0000000..656a6b1
--- /dev/null
+++ b/static/website/images/Rlogo.jpg
Binary files differ
diff --git a/static/website/images/Ruby.jpg b/static/website/images/Ruby.jpg
new file mode 100644
index 0000000..f1e9245
--- /dev/null
+++ b/static/website/images/Ruby.jpg
Binary files differ
diff --git a/static/website/images/Ruby_logo.png b/static/website/images/Ruby_logo.png
new file mode 100644
index 0000000..797167a
--- /dev/null
+++ b/static/website/images/Ruby_logo.png
Binary files differ
diff --git a/static/website/images/Scilab.jpg b/static/website/images/Scilab.jpg
new file mode 100644
index 0000000..56f6e22
--- /dev/null
+++ b/static/website/images/Scilab.jpg
Binary files differ
diff --git a/static/website/images/Selenium.jpg b/static/website/images/Selenium.jpg
new file mode 100644
index 0000000..756eac4
--- /dev/null
+++ b/static/website/images/Selenium.jpg
Binary files differ
diff --git a/static/website/images/Single-Board-Heater-System.gif b/static/website/images/Single-Board-Heater-System.gif
new file mode 100644
index 0000000..11fc206
--- /dev/null
+++ b/static/website/images/Single-Board-Heater-System.gif
Binary files differ
diff --git a/static/website/images/Single-Board-Heater-System.jpg b/static/website/images/Single-Board-Heater-System.jpg
new file mode 100644
index 0000000..b08dd00
--- /dev/null
+++ b/static/website/images/Single-Board-Heater-System.jpg
Binary files differ
diff --git a/static/website/images/Spoken-Tutorial-Technology.jpg b/static/website/images/Spoken-Tutorial-Technology.jpg
new file mode 100644
index 0000000..8c12ba1
--- /dev/null
+++ b/static/website/images/Spoken-Tutorial-Technology.jpg
Binary files differ
diff --git a/static/website/images/Step.jpg b/static/website/images/Step.jpg
new file mode 100644
index 0000000..a34d275
--- /dev/null
+++ b/static/website/images/Step.jpg
Binary files differ
diff --git a/static/website/images/Thunderbird.jpg b/static/website/images/Thunderbird.jpg
new file mode 100644
index 0000000..91e3723
--- /dev/null
+++ b/static/website/images/Thunderbird.jpg
Binary files differ
diff --git a/static/website/images/Tux-Typing.jpg b/static/website/images/Tux-Typing.jpg
new file mode 100644
index 0000000..4a22d6e
--- /dev/null
+++ b/static/website/images/Tux-Typing.jpg
Binary files differ
diff --git a/static/website/images/What-is-Spoken-Tutorial.jpg b/static/website/images/What-is-Spoken-Tutorial.jpg
new file mode 100644
index 0000000..8c12ba1
--- /dev/null
+++ b/static/website/images/What-is-Spoken-Tutorial.jpg
Binary files differ
diff --git a/static/website/images/Xfig.jpg b/static/website/images/Xfig.jpg
new file mode 100644
index 0000000..3f142aa
--- /dev/null
+++ b/static/website/images/Xfig.jpg
Binary files differ
diff --git a/static/website/images/big-logo.png b/static/website/images/big-logo.png
new file mode 100644
index 0000000..cd765bd
--- /dev/null
+++ b/static/website/images/big-logo.png
Binary files differ
diff --git a/static/website/images/camel_head.v25e738a.png b/static/website/images/camel_head.v25e738a.png
new file mode 100644
index 0000000..25e738a
--- /dev/null
+++ b/static/website/images/camel_head.v25e738a.png
Binary files differ
diff --git a/static/website/images/druplicon.large_.png b/static/website/images/druplicon.large_.png
new file mode 100644
index 0000000..f8ced55
--- /dev/null
+++ b/static/website/images/druplicon.large_.png
Binary files differ
diff --git a/static/website/images/firefox_logo-only_RGB-300dpi.jpg b/static/website/images/firefox_logo-only_RGB-300dpi.jpg
new file mode 100644
index 0000000..8101551
--- /dev/null
+++ b/static/website/images/firefox_logo-only_RGB-300dpi.jpg
Binary files differ
diff --git a/static/website/images/gchempaint_logo.png b/static/website/images/gchempaint_logo.png
new file mode 100644
index 0000000..640fa0c
--- /dev/null
+++ b/static/website/images/gchempaint_logo.png
Binary files differ
diff --git a/static/website/images/geogebra-logo.png b/static/website/images/geogebra-logo.png
new file mode 100644
index 0000000..9af2f87
--- /dev/null
+++ b/static/website/images/geogebra-logo.png
Binary files differ
diff --git a/static/website/images/gimp-logo.png b/static/website/images/gimp-logo.png
new file mode 100644
index 0000000..12b179b
--- /dev/null
+++ b/static/website/images/gimp-logo.png
Binary files differ
diff --git a/static/website/images/ktouch_logo.png b/static/website/images/ktouch_logo.png
new file mode 100644
index 0000000..f2d6d2f
--- /dev/null
+++ b/static/website/images/ktouch_logo.png
Binary files differ
diff --git a/static/website/images/logo.png b/static/website/images/logo.png
new file mode 100644
index 0000000..bdb36a5
--- /dev/null
+++ b/static/website/images/logo.png
Binary files differ
diff --git a/static/website/images/logo_gns3_small.png b/static/website/images/logo_gns3_small.png
new file mode 100644
index 0000000..4ec8d3b
--- /dev/null
+++ b/static/website/images/logo_gns3_small.png
Binary files differ
diff --git a/static/website/images/logo_openfoam.jpg b/static/website/images/logo_openfoam.jpg
new file mode 100644
index 0000000..9ef30e8
--- /dev/null
+++ b/static/website/images/logo_openfoam.jpg
Binary files differ
diff --git a/static/website/images/netbeans-logo.png b/static/website/images/netbeans-logo.png
new file mode 100644
index 0000000..f4a01ab
--- /dev/null
+++ b/static/website/images/netbeans-logo.png
Binary files differ
diff --git a/static/website/images/nglogo.jpg b/static/website/images/nglogo.jpg
new file mode 100644
index 0000000..4cc5638
--- /dev/null
+++ b/static/website/images/nglogo.jpg
Binary files differ
diff --git a/static/website/images/php_mysql_logo.jpg b/static/website/images/php_mysql_logo.jpg
new file mode 100644
index 0000000..36c718a
--- /dev/null
+++ b/static/website/images/php_mysql_logo.jpg
Binary files differ
diff --git a/static/website/images/python-logo.png b/static/website/images/python-logo.png
new file mode 100644
index 0000000..b3c7640
--- /dev/null
+++ b/static/website/images/python-logo.png
Binary files differ
diff --git a/static/website/images/pythonHi.gif b/static/website/images/pythonHi.gif
new file mode 100644
index 0000000..7e7231c
--- /dev/null
+++ b/static/website/images/pythonHi.gif
Binary files differ
diff --git a/static/website/images/python_logo_no_text.png b/static/website/images/python_logo_no_text.png
new file mode 100644
index 0000000..d42c54f
--- /dev/null
+++ b/static/website/images/python_logo_no_text.png
Binary files differ
diff --git a/static/website/images/qcad_icon.png b/static/website/images/qcad_icon.png
new file mode 100644
index 0000000..1439e15
--- /dev/null
+++ b/static/website/images/qcad_icon.png
Binary files differ
diff --git a/static/website/images/rrr/Advanced-C++.jpg b/static/website/images/rrr/Advanced-C++.jpg
new file mode 100644
index 0000000..4550d61
--- /dev/null
+++ b/static/website/images/rrr/Advanced-C++.jpg
Binary files differ
diff --git a/static/website/images/rrr/BASH.jpg b/static/website/images/rrr/BASH.jpg
new file mode 100644
index 0000000..9d29c7e
--- /dev/null
+++ b/static/website/images/rrr/BASH.jpg
Binary files differ
diff --git a/static/website/images/rrr/Blender.jpg b/static/website/images/rrr/Blender.jpg
new file mode 100644
index 0000000..14e8734
--- /dev/null
+++ b/static/website/images/rrr/Blender.jpg
Binary files differ
diff --git a/static/website/images/rrr/C-and-C++.jpg b/static/website/images/rrr/C-and-C++.jpg
new file mode 100644
index 0000000..b1e972b
--- /dev/null
+++ b/static/website/images/rrr/C-and-C++.jpg
Binary files differ
diff --git a/static/website/images/rrr/CellDesigner.jpg b/static/website/images/rrr/CellDesigner.jpg
new file mode 100644
index 0000000..17f9d00
--- /dev/null
+++ b/static/website/images/rrr/CellDesigner.jpg
Binary files differ
diff --git a/static/website/images/rrr/Digital-Divide.jpg b/static/website/images/rrr/Digital-Divide.jpg
new file mode 100644
index 0000000..e6595cf
--- /dev/null
+++ b/static/website/images/rrr/Digital-Divide.jpg
Binary files differ
diff --git a/static/website/images/rrr/Drupal.jpg b/static/website/images/rrr/Drupal.jpg
new file mode 100644
index 0000000..a01f8bc
--- /dev/null
+++ b/static/website/images/rrr/Drupal.jpg
Binary files differ
diff --git a/static/website/images/rrr/Firefox.jpg b/static/website/images/rrr/Firefox.jpg
new file mode 100644
index 0000000..189daf4
--- /dev/null
+++ b/static/website/images/rrr/Firefox.jpg
Binary files differ
diff --git a/static/website/images/rrr/GChemPaint.jpg b/static/website/images/rrr/GChemPaint.jpg
new file mode 100644
index 0000000..f1c7d20
--- /dev/null
+++ b/static/website/images/rrr/GChemPaint.jpg
Binary files differ
diff --git a/static/website/images/rrr/GIMP.jpg b/static/website/images/rrr/GIMP.jpg
new file mode 100644
index 0000000..af6b211
--- /dev/null
+++ b/static/website/images/rrr/GIMP.jpg
Binary files differ
diff --git a/static/website/images/rrr/GNS3.jpg b/static/website/images/rrr/GNS3.jpg
new file mode 100644
index 0000000..7656f84
--- /dev/null
+++ b/static/website/images/rrr/GNS3.jpg
Binary files differ
diff --git a/static/website/images/rrr/GSchem.jpg b/static/website/images/rrr/GSchem.jpg
new file mode 100644
index 0000000..e0cf4e1
--- /dev/null
+++ b/static/website/images/rrr/GSchem.jpg
Binary files differ
diff --git a/static/website/images/rrr/GeoGebra-for-Engineering-drawing.jpg b/static/website/images/rrr/GeoGebra-for-Engineering-drawing.jpg
new file mode 100644
index 0000000..3ff0a5e
--- /dev/null
+++ b/static/website/images/rrr/GeoGebra-for-Engineering-drawing.jpg
Binary files differ
diff --git a/static/website/images/rrr/Geogebra.jpg b/static/website/images/rrr/Geogebra.jpg
new file mode 100644
index 0000000..3ff0a5e
--- /dev/null
+++ b/static/website/images/rrr/Geogebra.jpg
Binary files differ
diff --git a/static/website/images/rrr/Java-Business-Application.jpg b/static/website/images/rrr/Java-Business-Application.jpg
new file mode 100644
index 0000000..e8046e4
--- /dev/null
+++ b/static/website/images/rrr/Java-Business-Application.jpg
Binary files differ
diff --git a/static/website/images/rrr/Java.jpg b/static/website/images/rrr/Java.jpg
new file mode 100644
index 0000000..9934a4a
--- /dev/null
+++ b/static/website/images/rrr/Java.jpg
Binary files differ
diff --git a/static/website/images/rrr/KTouch.jpg b/static/website/images/rrr/KTouch.jpg
new file mode 100644
index 0000000..4221d96
--- /dev/null
+++ b/static/website/images/rrr/KTouch.jpg
Binary files differ
diff --git a/static/website/images/rrr/KTurtle.jpg b/static/website/images/rrr/KTurtle.jpg
new file mode 100644
index 0000000..733e2c1
--- /dev/null
+++ b/static/website/images/rrr/KTurtle.jpg
Binary files differ
diff --git a/static/website/images/rrr/KiCad.jpg b/static/website/images/rrr/KiCad.jpg
new file mode 100644
index 0000000..8df8ac0
--- /dev/null
+++ b/static/website/images/rrr/KiCad.jpg
Binary files differ
diff --git a/static/website/images/rrr/LaTeX.jpg b/static/website/images/rrr/LaTeX.jpg
new file mode 100644
index 0000000..8fb73db
--- /dev/null
+++ b/static/website/images/rrr/LaTeX.jpg
Binary files differ
diff --git a/static/website/images/rrr/LibreOffice-Suite-Base.jpg b/static/website/images/rrr/LibreOffice-Suite-Base.jpg
new file mode 100644
index 0000000..0d9816a
--- /dev/null
+++ b/static/website/images/rrr/LibreOffice-Suite-Base.jpg
Binary files differ
diff --git a/static/website/images/rrr/LibreOffice-Suite-Calc.jpg b/static/website/images/rrr/LibreOffice-Suite-Calc.jpg
new file mode 100644
index 0000000..51d6cc0
--- /dev/null
+++ b/static/website/images/rrr/LibreOffice-Suite-Calc.jpg
Binary files differ
diff --git a/static/website/images/rrr/LibreOffice-Suite-Draw.jpg b/static/website/images/rrr/LibreOffice-Suite-Draw.jpg
new file mode 100644
index 0000000..9c42a88
--- /dev/null
+++ b/static/website/images/rrr/LibreOffice-Suite-Draw.jpg
Binary files differ
diff --git a/static/website/images/rrr/LibreOffice-Suite-Impress.jpg b/static/website/images/rrr/LibreOffice-Suite-Impress.jpg
new file mode 100644
index 0000000..ce82703
--- /dev/null
+++ b/static/website/images/rrr/LibreOffice-Suite-Impress.jpg
Binary files differ
diff --git a/static/website/images/rrr/LibreOffice-Suite-Math.jpg b/static/website/images/rrr/LibreOffice-Suite-Math.jpg
new file mode 100644
index 0000000..b33de64
--- /dev/null
+++ b/static/website/images/rrr/LibreOffice-Suite-Math.jpg
Binary files differ
diff --git a/static/website/images/rrr/LibreOffice-Suite-Writer.jpg b/static/website/images/rrr/LibreOffice-Suite-Writer.jpg
new file mode 100644
index 0000000..adce0fb
--- /dev/null
+++ b/static/website/images/rrr/LibreOffice-Suite-Writer.jpg
Binary files differ
diff --git a/static/website/images/rrr/Linux.jpg b/static/website/images/rrr/Linux.jpg
new file mode 100644
index 0000000..491bddb
--- /dev/null
+++ b/static/website/images/rrr/Linux.jpg
Binary files differ
diff --git a/static/website/images/rrr/Netbeans.jpg b/static/website/images/rrr/Netbeans.jpg
new file mode 100644
index 0000000..66c5753
--- /dev/null
+++ b/static/website/images/rrr/Netbeans.jpg
Binary files differ
diff --git a/static/website/images/rrr/Ngspice.jpg b/static/website/images/rrr/Ngspice.jpg
new file mode 100644
index 0000000..a319e31
--- /dev/null
+++ b/static/website/images/rrr/Ngspice.jpg
Binary files differ
diff --git a/static/website/images/rrr/OpenFOAM.jpg b/static/website/images/rrr/OpenFOAM.jpg
new file mode 100644
index 0000000..7e20f33
--- /dev/null
+++ b/static/website/images/rrr/OpenFOAM.jpg
Binary files differ
diff --git a/static/website/images/rrr/Orca.jpg b/static/website/images/rrr/Orca.jpg
new file mode 100644
index 0000000..cf7797c
--- /dev/null
+++ b/static/website/images/rrr/Orca.jpg
Binary files differ
diff --git a/static/website/images/rrr/PERL.jpg b/static/website/images/rrr/PERL.jpg
new file mode 100644
index 0000000..5159d78
--- /dev/null
+++ b/static/website/images/rrr/PERL.jpg
Binary files differ
diff --git a/static/website/images/rrr/PHP-and-MySQL.jpg b/static/website/images/rrr/PHP-and-MySQL.jpg
new file mode 100644
index 0000000..d8d7efa
--- /dev/null
+++ b/static/website/images/rrr/PHP-and-MySQL.jpg
Binary files differ
diff --git a/static/website/images/rrr/Python-Old-Version.jpg b/static/website/images/rrr/Python-Old-Version.jpg
new file mode 100644
index 0000000..cf40bb8
--- /dev/null
+++ b/static/website/images/rrr/Python-Old-Version.jpg
Binary files differ
diff --git a/static/website/images/rrr/Python.jpg b/static/website/images/rrr/Python.jpg
new file mode 100644
index 0000000..4023cce
--- /dev/null
+++ b/static/website/images/rrr/Python.jpg
Binary files differ
diff --git a/static/website/images/rrr/QCad.jpg b/static/website/images/rrr/QCad.jpg
new file mode 100644
index 0000000..293046b
--- /dev/null
+++ b/static/website/images/rrr/QCad.jpg
Binary files differ
diff --git a/static/website/images/rrr/R.jpg b/static/website/images/rrr/R.jpg
new file mode 100644
index 0000000..b1fb8da
--- /dev/null
+++ b/static/website/images/rrr/R.jpg
Binary files differ
diff --git a/static/website/images/rrr/Rlogo.jpg b/static/website/images/rrr/Rlogo.jpg
new file mode 100644
index 0000000..656a6b1
--- /dev/null
+++ b/static/website/images/rrr/Rlogo.jpg
Binary files differ
diff --git a/static/website/images/rrr/Ruby.jpg b/static/website/images/rrr/Ruby.jpg
new file mode 100644
index 0000000..f1e9245
--- /dev/null
+++ b/static/website/images/rrr/Ruby.jpg
Binary files differ
diff --git a/static/website/images/rrr/Scilab.jpg b/static/website/images/rrr/Scilab.jpg
new file mode 100644
index 0000000..56f6e22
--- /dev/null
+++ b/static/website/images/rrr/Scilab.jpg
Binary files differ
diff --git a/static/website/images/rrr/Selenium.jpg b/static/website/images/rrr/Selenium.jpg
new file mode 100644
index 0000000..756eac4
--- /dev/null
+++ b/static/website/images/rrr/Selenium.jpg
Binary files differ
diff --git a/static/website/images/rrr/Single-Board-Heater-System.jpg b/static/website/images/rrr/Single-Board-Heater-System.jpg
new file mode 100644
index 0000000..b08dd00
--- /dev/null
+++ b/static/website/images/rrr/Single-Board-Heater-System.jpg
Binary files differ
diff --git a/static/website/images/rrr/Spoken-Tutorial-Technology.jpg b/static/website/images/rrr/Spoken-Tutorial-Technology.jpg
new file mode 100644
index 0000000..8c12ba1
--- /dev/null
+++ b/static/website/images/rrr/Spoken-Tutorial-Technology.jpg
Binary files differ
diff --git a/static/website/images/rrr/Step.jpg b/static/website/images/rrr/Step.jpg
new file mode 100644
index 0000000..a34d275
--- /dev/null
+++ b/static/website/images/rrr/Step.jpg
Binary files differ
diff --git a/static/website/images/rrr/Thunderbird.jpg b/static/website/images/rrr/Thunderbird.jpg
new file mode 100644
index 0000000..91e3723
--- /dev/null
+++ b/static/website/images/rrr/Thunderbird.jpg
Binary files differ
diff --git a/static/website/images/rrr/Tux-Typing.jpg b/static/website/images/rrr/Tux-Typing.jpg
new file mode 100644
index 0000000..4a22d6e
--- /dev/null
+++ b/static/website/images/rrr/Tux-Typing.jpg
Binary files differ
diff --git a/static/website/images/rrr/What-is-Spoken-Tutorial.jpg b/static/website/images/rrr/What-is-Spoken-Tutorial.jpg
new file mode 100644
index 0000000..8c12ba1
--- /dev/null
+++ b/static/website/images/rrr/What-is-Spoken-Tutorial.jpg
Binary files differ
diff --git a/static/website/images/rrr/Xfig.jpg b/static/website/images/rrr/Xfig.jpg
new file mode 100644
index 0000000..3f142aa
--- /dev/null
+++ b/static/website/images/rrr/Xfig.jpg
Binary files differ
diff --git a/static/website/images/rrr/logo_openfoam.jpg b/static/website/images/rrr/logo_openfoam.jpg
new file mode 100644
index 0000000..9ef30e8
--- /dev/null
+++ b/static/website/images/rrr/logo_openfoam.jpg
Binary files differ
diff --git a/static/website/images/scilab.png b/static/website/images/scilab.png
new file mode 100644
index 0000000..c6f5c84
--- /dev/null
+++ b/static/website/images/scilab.png
Binary files differ
diff --git a/static/website/images/thunderbird.jpg b/static/website/images/thunderbird.jpg
new file mode 100644
index 0000000..39f0384
--- /dev/null
+++ b/static/website/images/thunderbird.jpg
Binary files differ
diff --git a/static/website/images/tux-typing-1.png b/static/website/images/tux-typing-1.png
new file mode 100644
index 0000000..335b18e
--- /dev/null
+++ b/static/website/images/tux-typing-1.png
Binary files differ
diff --git a/static/website/images/xfig_splash_logo.png b/static/website/images/xfig_splash_logo.png
new file mode 100644
index 0000000..9f104cb
--- /dev/null
+++ b/static/website/images/xfig_splash_logo.png
Binary files differ
diff --git a/static/website/js/custom.js b/static/website/js/custom.js
index 467ba9d..49b4053 100644
--- a/static/website/js/custom.js
+++ b/static/website/js/custom.js
@@ -66,6 +66,7 @@ $(document).ready(function() {
});
});
+
$(document).ajaxStart(function() {
$("#ajax-loader").show();
});
diff --git a/static/website/js/nicEdit.js b/static/website/js/nicEdit.js
index c890433..f915847 100644..100755
--- a/static/website/js/nicEdit.js
+++ b/static/website/js/nicEdit.js
@@ -4,10 +4,250 @@
* NicEdit is distributed under the terms of the MIT license
* For more information visit http://nicedit.com/
* Do not remove this copyright message
- */
-var bkExtend=function(){var A=arguments;if(A.length==1){A=[this,A[0]]}for(var B in A[1]){A[0][B]=A[1][B]}return A[0]};function bkClass(){}bkClass.prototype.construct=function(){};bkClass.extend=function(C){var A=function(){if(arguments[0]!==bkClass){return this.construct.apply(this,arguments)}};var B=new this(bkClass);bkExtend(B,C);A.prototype=B;A.extend=this.extend;return A};var bkElement=bkClass.extend({construct:function(B,A){if(typeof (B)=="string"){B=(A||document).createElement(B)}B=$BK(B);return B},appendTo:function(A){A.appendChild(this);return this},appendBefore:function(A){A.parentNode.insertBefore(this,A);return this},addEvent:function(B,A){bkLib.addEvent(this,B,A);return this},setContent:function(A){this.innerHTML=A;return this},pos:function(){var C=curtop=0;var B=obj=this;if(obj.offsetParent){do{C+=obj.offsetLeft;curtop+=obj.offsetTop}while(obj=obj.offsetParent)}var A=(!window.opera)?parseInt(this.getStyle("border-width")||this.style.border)||0:0;return[C+A,curtop+A+this.offsetHeight]},noSelect:function(){bkLib.noSelect(this);return this},parentTag:function(A){var B=this;do{if(B&&B.nodeName&&B.nodeName.toUpperCase()==A){return B}B=B.parentNode}while(B);return false},hasClass:function(A){return this.className.match(new RegExp("(\\s|^)nicEdit-"+A+"(\\s|$)"))},addClass:function(A){if(!this.hasClass(A)){this.className+=" nicEdit-"+A}return this},removeClass:function(A){if(this.hasClass(A)){this.className=this.className.replace(new RegExp("(\\s|^)nicEdit-"+A+"(\\s|$)")," ")}return this},setStyle:function(A){var B=this.style;for(var C in A){switch(C){case"float":B.cssFloat=B.styleFloat=A[C];break;case"opacity":B.opacity=A[C];B.filter="alpha(opacity="+Math.round(A[C]*100)+")";break;case"className":this.className=A[C];break;default:B[C]=A[C]}}return this},getStyle:function(A,C){var B=(!C)?document.defaultView:C;if(this.nodeType==1){return(B&&B.getComputedStyle)?B.getComputedStyle(this,null).getPropertyValue(A):this.currentStyle[bkLib.camelize(A)]}},remove:function(){this.parentNode.removeChild(this);return this},setAttributes:function(A){for(var B in A){this[B]=A[B]}return this}});var bkLib={isMSIE:(navigator.appVersion.indexOf("MSIE")!=-1),addEvent:function(C,B,A){(C.addEventListener)?C.addEventListener(B,A,false):C.attachEvent("on"+B,A)},toArray:function(C){var B=C.length,A=new Array(B);while(B--){A[B]=C[B]}return A},noSelect:function(B){if(B.setAttribute&&B.nodeName.toLowerCase()!="input"&&B.nodeName.toLowerCase()!="textarea"){B.setAttribute("unselectable","on")}for(var A=0;A<B.childNodes.length;A++){bkLib.noSelect(B.childNodes[A])}},camelize:function(A){return A.replace(/\-(.)/g,function(B,C){return C.toUpperCase()})},inArray:function(A,B){return(bkLib.search(A,B)!=null)},search:function(A,C){for(var B=0;B<A.length;B++){if(A[B]==C){return B}}return null},cancelEvent:function(A){A=A||window.event;if(A.preventDefault&&A.stopPropagation){A.preventDefault();A.stopPropagation()}return false},domLoad:[],domLoaded:function(){if(arguments.callee.done){return }arguments.callee.done=true;for(i=0;i<bkLib.domLoad.length;i++){bkLib.domLoad[i]()}},onDomLoaded:function(A){this.domLoad.push(A);if(document.addEventListener){document.addEventListener("DOMContentLoaded",bkLib.domLoaded,null)}else{if(bkLib.isMSIE){document.write("<style>.nicEdit-main p { margin: 0; }</style><script id=__ie_onload defer "+((location.protocol=="https:")?"src='javascript:void(0)'":"src=//0")+"><\/script>");$BK("__ie_onload").onreadystatechange=function(){if(this.readyState=="complete"){bkLib.domLoaded()}}}}window.onload=bkLib.domLoaded}};function $BK(A){if(typeof (A)=="string"){A=document.getElementById(A)}return(A&&!A.appendTo)?bkExtend(A,bkElement.prototype):A}var bkEvent={addEvent:function(A,B){if(B){this.eventList=this.eventList||{};this.eventList[A]=this.eventList[A]||[];this.eventList[A].push(B)}return this},fireEvent:function(){var A=bkLib.toArray(arguments),C=A.shift();if(this.eventList&&this.eventList[C]){for(var B=0;B<this.eventList[C].length;B++){this.eventList[C][B].apply(this,A)}}}};function __(A){return A}Function.prototype.closure=function(){var A=this,B=bkLib.toArray(arguments),C=B.shift();return function(){if(typeof (bkLib)!="undefined"){return A.apply(C,B.concat(bkLib.toArray(arguments)))}}};Function.prototype.closureListener=function(){var A=this,C=bkLib.toArray(arguments),B=C.shift();return function(E){E=E||window.event;if(E.target){var D=E.target}else{var D=E.srcElement}return A.apply(B,[E,D].concat(C))}};
+ */
+var bkExtend = function(){
+ var args = arguments;
+ if (args.length == 1) args = [this, args[0]];
+ for (var prop in args[1]) args[0][prop] = args[1][prop];
+ return args[0];
+};
+function bkClass() { }
+bkClass.prototype.construct = function() {};
+bkClass.extend = function(def) {
+ var classDef = function() {
+ if (arguments[0] !== bkClass) { return this.construct.apply(this, arguments); }
+ };
+ var proto = new this(bkClass);
+ bkExtend(proto,def);
+ classDef.prototype = proto;
+ classDef.extend = this.extend;
+ return classDef;
+};
+
+var bkElement = bkClass.extend({
+ construct : function(elm,d) {
+ if(typeof(elm) == "string") {
+ elm = (d || document).createElement(elm);
+ }
+ elm = $BK(elm);
+ return elm;
+ },
+ appendTo : function(elm) {
+ elm.appendChild(this);
+ return this;
+ },
+
+ appendBefore : function(elm) {
+ elm.parentNode.insertBefore(this,elm);
+ return this;
+ },
+ addEvent : function(type, fn) {
+ bkLib.addEvent(this,type,fn);
+ return this;
+ },
+
+ setContent : function(c) {
+ this.innerHTML = c;
+ return this;
+ },
+
+ pos : function() {
+ var curleft = curtop = 0;
+ var o = obj = this;
+ if (obj.offsetParent) {
+ do {
+ curleft += obj.offsetLeft;
+ curtop += obj.offsetTop;
+ } while (obj = obj.offsetParent);
+ }
+ var b = (!window.opera) ? parseInt(this.getStyle('border-width') || this.style.border) || 0 : 0;
+ return [curleft+b,curtop+b+this.offsetHeight];
+ },
+
+ noSelect : function() {
+ bkLib.noSelect(this);
+ return this;
+ },
+
+ parentTag : function(t) {
+ var elm = this;
+ do {
+ if(elm && elm.nodeName && elm.nodeName.toUpperCase() == t) {
+ return elm;
+ }
+ elm = elm.parentNode;
+ } while(elm);
+ return false;
+ },
+
+ hasClass : function(cls) {
+ return this.className.match(new RegExp('(\\s|^)nicEdit-'+cls+'(\\s|$)'));
+ },
+
+ addClass : function(cls) {
+ if (!this.hasClass(cls)) { this.className += " nicEdit-"+cls };
+ return this;
+ },
+
+ removeClass : function(cls) {
+ if (this.hasClass(cls)) {
+ this.className = this.className.replace(new RegExp('(\\s|^)nicEdit-'+cls+'(\\s|$)'),' ');
+ }
+ return this;
+ },
+
+ setStyle : function(st) {
+ var elmStyle = this.style;
+ for(var itm in st) {
+ switch(itm) {
+ case 'float':
+ elmStyle['cssFloat'] = elmStyle['styleFloat'] = st[itm];
+ break;
+ case 'opacity':
+ elmStyle.opacity = st[itm];
+ elmStyle.filter = "alpha(opacity=" + Math.round(st[itm]*100) + ")";
+ break;
+ case 'className':
+ this.className = st[itm];
+ break;
+ default:
+ //if(document.compatMode || itm != "cursor") { // Nasty Workaround for IE 5.5
+ elmStyle[itm] = st[itm];
+ //}
+ }
+ }
+ return this;
+ },
+
+ getStyle : function( cssRule, d ) {
+ var doc = (!d) ? document.defaultView : d;
+ if(this.nodeType == 1)
+ return (doc && doc.getComputedStyle) ? doc.getComputedStyle( this, null ).getPropertyValue(cssRule) : this.currentStyle[ bkLib.camelize(cssRule) ];
+ },
+
+ remove : function() {
+ this.parentNode.removeChild(this);
+ return this;
+ },
+
+ setAttributes : function(at) {
+ for(var itm in at) {
+ this[itm] = at[itm];
+ }
+ return this;
+ }
+});
+
+var bkLib = {
+ isMSIE : (navigator.appVersion.indexOf("MSIE") != -1),
+
+ addEvent : function(obj, type, fn) {
+ (obj.addEventListener) ? obj.addEventListener( type, fn, false ) : obj.attachEvent("on"+type, fn);
+ },
+
+ toArray : function(iterable) {
+ var length = iterable.length, results = new Array(length);
+ while (length--) { results[length] = iterable[length] };
+ return results;
+ },
+
+ noSelect : function(element) {
+ if(element.setAttribute && element.nodeName.toLowerCase() != 'input' && element.nodeName.toLowerCase() != 'textarea') {
+ element.setAttribute('unselectable','on');
+ }
+ for(var i=0;i<element.childNodes.length;i++) {
+ bkLib.noSelect(element.childNodes[i]);
+ }
+ },
+ camelize : function(s) {
+ return s.replace(/\-(.)/g, function(m, l){return l.toUpperCase()});
+ },
+ inArray : function(arr,item) {
+ return (bkLib.search(arr,item) != null);
+ },
+ search : function(arr,itm) {
+ for(var i=0; i < arr.length; i++) {
+ if(arr[i] == itm)
+ return i;
+ }
+ return null;
+ },
+ cancelEvent : function(e) {
+ e = e || window.event;
+ if(e.preventDefault && e.stopPropagation) {
+ e.preventDefault();
+ e.stopPropagation();
+ }
+ return false;
+ },
+ domLoad : [],
+ domLoaded : function() {
+ if (arguments.callee.done) return;
+ arguments.callee.done = true;
+ for (i = 0;i < bkLib.domLoad.length;i++) bkLib.domLoad[i]();
+ },
+ onDomLoaded : function(fireThis) {
+ this.domLoad.push(fireThis);
+ if (document.addEventListener) {
+ document.addEventListener("DOMContentLoaded", bkLib.domLoaded, null);
+ } else if(bkLib.isMSIE) {
+ document.write("<style>.nicEdit-main p { margin: 0; }</style><scr"+"ipt id=__ie_onload defer " + ((location.protocol == "https:") ? "src='javascript:void(0)'" : "src=//0") + "><\/scr"+"ipt>");
+ $BK("__ie_onload").onreadystatechange = function() {
+ if (this.readyState == "complete"){bkLib.domLoaded();}
+ };
+ }
+ window.onload = bkLib.domLoaded;
+ }
+};
+
+function $BK(elm) {
+ if(typeof(elm) == "string") {
+ elm = document.getElementById(elm);
+ }
+ return (elm && !elm.appendTo) ? bkExtend(elm,bkElement.prototype) : elm;
+}
+
+var bkEvent = {
+ addEvent : function(evType, evFunc) {
+ if(evFunc) {
+ this.eventList = this.eventList || {};
+ this.eventList[evType] = this.eventList[evType] || [];
+ this.eventList[evType].push(evFunc);
+ }
+ return this;
+ },
+ fireEvent : function() {
+ var args = bkLib.toArray(arguments), evType = args.shift();
+ if(this.eventList && this.eventList[evType]) {
+ for(var i=0;i<this.eventList[evType].length;i++) {
+ this.eventList[evType][i].apply(this,args);
+ }
+ }
+ }
+};
+
+function __(s) {
+ return s;
+}
+
+Function.prototype.closure = function() {
+ var __method = this, args = bkLib.toArray(arguments), obj = args.shift();
+ return function() { if(typeof(bkLib) != 'undefined') { return __method.apply(obj,args.concat(bkLib.toArray(arguments))); } };
+}
+
+Function.prototype.closureListener = function() {
+ var __method = this, args = bkLib.toArray(arguments), object = args.shift();
+ return function(e) {
+ e = e || window.event;
+ if(e.target) { var target = e.target; } else { var target = e.srcElement };
+ return __method.apply(object, [e,target].concat(args) );
+ };
+}
+
+
+/* START CONFIG */
var nicEditorConfig = bkClass.extend({
buttons : {
@@ -30,27 +270,784 @@ var nicEditorConfig = bkClass.extend({
},
iconsPath : '../nicEditorIcons.gif',
buttonList : ['save','bold','italic','underline','left','center','right','justify','ol','ul','fontSize','fontFamily','fontFormat','indent','outdent','image','upload','link','unlink','forecolor','bgcolor'],
- iconList : {"bgcolor":1,"forecolor":2,"bold":3,"center":4,"hr":5,"indent":6,"italic":7,"justify":8,"left":9,"ol":10,"outdent":11,"removeformat":12,"right":13,"save":24,"strikethrough":15,"subscript":16,"superscript":17,"ul":18,"underline":19,"image":20,"link":21,"unlink":22,"close":23,"arrow":25}
-
-});
-;
-var nicEditors={nicPlugins:[],editors:[],registerPlugin:function(B,A){this.nicPlugins.push({p:B,o:A})},allTextAreas:function(C){var A=document.getElementsByTagName("textarea");for(var B=0;B<A.length;B++){nicEditors.editors.push(new nicEditor(C).panelInstance(A[B]))}return nicEditors.editors},findEditor:function(C){var B=nicEditors.editors;for(var A=0;A<B.length;A++){if(B[A].instanceById(C)){return B[A].instanceById(C)}}}};var nicEditor=bkClass.extend({construct:function(C){this.options=new nicEditorConfig();bkExtend(this.options,C);this.nicInstances=new Array();this.loadedPlugins=new Array();var A=nicEditors.nicPlugins;for(var B=0;B<A.length;B++){this.loadedPlugins.push(new A[B].p(this,A[B].o))}nicEditors.editors.push(this);bkLib.addEvent(document.body,"mousedown",this.selectCheck.closureListener(this))},panelInstance:function(B,C){B=this.checkReplace($BK(B));var A=new bkElement("DIV").setStyle({width:(parseInt(B.getStyle("width"))||B.clientWidth)+"px"}).appendBefore(B);this.setPanel(A);return this.addInstance(B,C)},checkReplace:function(B){var A=nicEditors.findEditor(B);if(A){A.removeInstance(B);A.removePanel()}return B},addInstance:function(B,C){B=this.checkReplace($BK(B));if(B.contentEditable||!!window.opera){var A=new nicEditorInstance(B,C,this)}else{var A=new nicEditorIFrameInstance(B,C,this)}this.nicInstances.push(A);return this},removeInstance:function(C){C=$BK(C);var B=this.nicInstances;for(var A=0;A<B.length;A++){if(B[A].e==C){B[A].remove();this.nicInstances.splice(A,1)}}},removePanel:function(A){if(this.nicPanel){this.nicPanel.remove();this.nicPanel=null}},instanceById:function(C){C=$BK(C);var B=this.nicInstances;for(var A=0;A<B.length;A++){if(B[A].e==C){return B[A]}}},setPanel:function(A){this.nicPanel=new nicEditorPanel($BK(A),this.options,this);this.fireEvent("panel",this.nicPanel);return this},nicCommand:function(B,A){if(this.selectedInstance){this.selectedInstance.nicCommand(B,A)}},getIcon:function(D,A){var C=this.options.iconList[D];var B=(A.iconFiles)?A.iconFiles[D]:"";return{backgroundImage:"url('"+((C)?this.options.iconsPath:B)+"')",backgroundPosition:((C)?((C-1)*-18):0)+"px 0px"}},selectCheck:function(C,A){var B=false;do{if(A.className&&A.className.indexOf("nicEdit")!=-1){return false}}while(A=A.parentNode);this.fireEvent("blur",this.selectedInstance,A);this.lastSelectedInstance=this.selectedInstance;this.selectedInstance=null;return false}});nicEditor=nicEditor.extend(bkEvent);
-var nicEditorInstance=bkClass.extend({isSelected:false,construct:function(G,D,C){this.ne=C;this.elm=this.e=G;this.options=D||{};newX=parseInt(G.getStyle("width"))||G.clientWidth;newY=parseInt(G.getStyle("height"))||G.clientHeight;this.initialHeight=newY-8;var H=(G.nodeName.toLowerCase()=="textarea");if(H||this.options.hasPanel){var B=(bkLib.isMSIE&&!((typeof document.body.style.maxHeight!="undefined")&&document.compatMode=="CSS1Compat"));var E={width:newX+"px",border:"1px solid #ccc",borderTop:0,overflowY:"auto",overflowX:"hidden"};E[(B)?"height":"maxHeight"]=(this.ne.options.maxHeight)?this.ne.options.maxHeight+"px":null;this.editorContain=new bkElement("DIV").setStyle(E).appendBefore(G);var A=new bkElement("DIV").setStyle({width:(newX-8)+"px",margin:"4px",minHeight:newY+"px"}).addClass("main").appendTo(this.editorContain);G.setStyle({display:"none"});A.innerHTML=G.innerHTML;if(H){A.setContent(G.value);this.copyElm=G;var F=G.parentTag("FORM");if(F){bkLib.addEvent(F,"submit",this.saveContent.closure(this))}}A.setStyle((B)?{height:newY+"px"}:{overflow:"hidden"});this.elm=A}this.ne.addEvent("blur",this.blur.closure(this));this.init();this.blur()},init:function(){this.elm.setAttribute("contentEditable","true");if(this.getContent()==""){this.setContent("<br />")}this.instanceDoc=document.defaultView;this.elm.addEvent("mousedown",this.selected.closureListener(this)).addEvent("keypress",this.keyDown.closureListener(this)).addEvent("focus",this.selected.closure(this)).addEvent("blur",this.blur.closure(this)).addEvent("keyup",this.selected.closure(this));this.ne.fireEvent("add",this)},remove:function(){this.saveContent();if(this.copyElm||this.options.hasPanel){this.editorContain.remove();this.e.setStyle({display:"block"});this.ne.removePanel()}this.disable();this.ne.fireEvent("remove",this)},disable:function(){this.elm.setAttribute("contentEditable","false")},getSel:function(){return(window.getSelection)?window.getSelection():document.selection},getRng:function(){var A=this.getSel();if(!A||A.rangeCount===0){return }return(A.rangeCount>0)?A.getRangeAt(0):A.createRange()},selRng:function(A,B){if(window.getSelection){B.removeAllRanges();B.addRange(A)}else{A.select()}},selElm:function(){var C=this.getRng();if(!C){return }if(C.startContainer){var D=C.startContainer;if(C.cloneContents().childNodes.length==1){for(var B=0;B<D.childNodes.length;B++){var A=D.childNodes[B].ownerDocument.createRange();A.selectNode(D.childNodes[B]);if(C.compareBoundaryPoints(Range.START_TO_START,A)!=1&&C.compareBoundaryPoints(Range.END_TO_END,A)!=-1){return $BK(D.childNodes[B])}}}return $BK(D)}else{return $BK((this.getSel().type=="Control")?C.item(0):C.parentElement())}},saveRng:function(){this.savedRange=this.getRng();this.savedSel=this.getSel()},restoreRng:function(){if(this.savedRange){this.selRng(this.savedRange,this.savedSel)}},keyDown:function(B,A){if(B.ctrlKey){this.ne.fireEvent("key",this,B)}},selected:function(C,A){if(!A&&!(A=this.selElm)){A=this.selElm()}if(!C.ctrlKey){var B=this.ne.selectedInstance;if(B!=this){if(B){this.ne.fireEvent("blur",B,A)}this.ne.selectedInstance=this;this.ne.fireEvent("focus",B,A)}this.ne.fireEvent("selected",B,A);this.isFocused=true;this.elm.addClass("selected")}return false},blur:function(){this.isFocused=false;this.elm.removeClass("selected")},saveContent:function(){if(this.copyElm||this.options.hasPanel){this.ne.fireEvent("save",this);(this.copyElm)?this.copyElm.value=this.getContent():this.e.innerHTML=this.getContent()}},getElm:function(){return this.elm},getContent:function(){this.content=this.getElm().innerHTML;this.ne.fireEvent("get",this);return this.content},setContent:function(A){this.content=A;this.ne.fireEvent("set",this);this.elm.innerHTML=this.content},nicCommand:function(B,A){document.execCommand(B,false,A)}});
-var nicEditorIFrameInstance=nicEditorInstance.extend({savedStyles:[],init:function(){var B=this.elm.innerHTML.replace(/^\s+|\s+$/g,"");this.elm.innerHTML="";(!B)?B="<br />":B;this.initialContent=B;this.elmFrame=new bkElement("iframe").setAttributes({src:"javascript:;",frameBorder:0,allowTransparency:"true",scrolling:"no"}).setStyle({height:"100px",width:"100%"}).addClass("frame").appendTo(this.elm);if(this.copyElm){this.elmFrame.setStyle({width:(this.elm.offsetWidth-4)+"px"})}var A=["font-size","font-family","font-weight","color"];for(itm in A){this.savedStyles[bkLib.camelize(itm)]=this.elm.getStyle(itm)}setTimeout(this.initFrame.closure(this),50)},disable:function(){this.elm.innerHTML=this.getContent()},initFrame:function(){var B=$BK(this.elmFrame.contentWindow.document);B.designMode="on";B.open();var A=this.ne.options.externalCSS;B.write("<html><head>"+((A)?'<link href="'+A+'" rel="stylesheet" type="text/css" />':"")+'</head><body id="nicEditContent" style="margin: 0 !important; background-color: transparent !important;">'+this.initialContent+"</body></html>");B.close();this.frameDoc=B;this.frameWin=$BK(this.elmFrame.contentWindow);this.frameContent=$BK(this.frameWin.document.body).setStyle(this.savedStyles);this.instanceDoc=this.frameWin.document.defaultView;this.heightUpdate();this.frameDoc.addEvent("mousedown",this.selected.closureListener(this)).addEvent("keyup",this.heightUpdate.closureListener(this)).addEvent("keydown",this.keyDown.closureListener(this)).addEvent("keyup",this.selected.closure(this));this.ne.fireEvent("add",this)},getElm:function(){return this.frameContent},setContent:function(A){this.content=A;this.ne.fireEvent("set",this);this.frameContent.innerHTML=this.content;this.heightUpdate()},getSel:function(){return(this.frameWin)?this.frameWin.getSelection():this.frameDoc.selection},heightUpdate:function(){this.elmFrame.style.height=Math.max(this.frameContent.offsetHeight,this.initialHeight)+"px"},nicCommand:function(B,A){this.frameDoc.execCommand(B,false,A);setTimeout(this.heightUpdate.closure(this),100)}});
-var nicEditorPanel=bkClass.extend({construct:function(E,B,A){this.elm=E;this.options=B;this.ne=A;this.panelButtons=new Array();this.buttonList=bkExtend([],this.ne.options.buttonList);this.panelContain=new bkElement("DIV").setStyle({overflow:"hidden",width:"100%",border:"1px solid #cccccc",backgroundColor:"#efefef"}).addClass("panelContain");this.panelElm=new bkElement("DIV").setStyle({margin:"2px",marginTop:"0px",zoom:1,overflow:"hidden"}).addClass("panel").appendTo(this.panelContain);this.panelContain.appendTo(E);var C=this.ne.options;var D=C.buttons;for(button in D){this.addButton(button,C,true)}this.reorder();E.noSelect()},addButton:function(buttonName,options,noOrder){var button=options.buttons[buttonName];var type=(button.type)?eval("(typeof("+button.type+') == "undefined") ? null : '+button.type+";"):nicEditorButton;var hasButton=bkLib.inArray(this.buttonList,buttonName);if(type&&(hasButton||this.ne.options.fullPanel)){this.panelButtons.push(new type(this.panelElm,buttonName,options,this.ne));if(!hasButton){this.buttonList.push(buttonName)}}},findButton:function(B){for(var A=0;A<this.panelButtons.length;A++){if(this.panelButtons[A].name==B){return this.panelButtons[A]}}},reorder:function(){var C=this.buttonList;for(var B=0;B<C.length;B++){var A=this.findButton(C[B]);if(A){this.panelElm.appendChild(A.margin)}}},remove:function(){this.elm.remove()}});
-var nicEditorButton=bkClass.extend({construct:function(D,A,C,B){this.options=C.buttons[A];this.name=A;this.ne=B;this.elm=D;this.margin=new bkElement("DIV").setStyle({"float":"left",marginTop:"2px"}).appendTo(D);this.contain=new bkElement("DIV").setStyle({width:"20px",height:"20px"}).addClass("buttonContain").appendTo(this.margin);this.border=new bkElement("DIV").setStyle({backgroundColor:"#efefef",border:"1px solid #efefef"}).appendTo(this.contain);this.button=new bkElement("DIV").setStyle({width:"18px",height:"18px",overflow:"hidden",zoom:1,cursor:"pointer"}).addClass("button").setStyle(this.ne.getIcon(A,C)).appendTo(this.border);this.button.addEvent("mouseover",this.hoverOn.closure(this)).addEvent("mouseout",this.hoverOff.closure(this)).addEvent("mousedown",this.mouseClick.closure(this)).noSelect();if(!window.opera){this.button.onmousedown=this.button.onclick=bkLib.cancelEvent}B.addEvent("selected",this.enable.closure(this)).addEvent("blur",this.disable.closure(this)).addEvent("key",this.key.closure(this));this.disable();this.init()},init:function(){},hide:function(){this.contain.setStyle({display:"none"})},updateState:function(){if(this.isDisabled){this.setBg()}else{if(this.isHover){this.setBg("hover")}else{if(this.isActive){this.setBg("active")}else{this.setBg()}}}},setBg:function(A){switch(A){case"hover":var B={border:"1px solid #666",backgroundColor:"#ddd"};break;case"active":var B={border:"1px solid #666",backgroundColor:"#ccc"};break;default:var B={border:"1px solid #efefef",backgroundColor:"#efefef"}}this.border.setStyle(B).addClass("button-"+A)},checkNodes:function(A){var B=A;do{if(this.options.tags&&bkLib.inArray(this.options.tags,B.nodeName)){this.activate();return true}}while(B=B.parentNode&&B.className!="nicEdit");B=$BK(A);while(B.nodeType==3){B=$BK(B.parentNode)}if(this.options.css){for(itm in this.options.css){if(B.getStyle(itm,this.ne.selectedInstance.instanceDoc)==this.options.css[itm]){this.activate();return true}}}this.deactivate();return false},activate:function(){if(!this.isDisabled){this.isActive=true;this.updateState();this.ne.fireEvent("buttonActivate",this)}},deactivate:function(){this.isActive=false;this.updateState();if(!this.isDisabled){this.ne.fireEvent("buttonDeactivate",this)}},enable:function(A,B){this.isDisabled=false;this.contain.setStyle({opacity:1}).addClass("buttonEnabled");this.updateState();this.checkNodes(B)},disable:function(A,B){this.isDisabled=true;this.contain.setStyle({opacity:0.6}).removeClass("buttonEnabled");this.updateState()},toggleActive:function(){(this.isActive)?this.deactivate():this.activate()},hoverOn:function(){if(!this.isDisabled){this.isHover=true;this.updateState();this.ne.fireEvent("buttonOver",this)}},hoverOff:function(){this.isHover=false;this.updateState();this.ne.fireEvent("buttonOut",this)},mouseClick:function(){if(this.options.command){this.ne.nicCommand(this.options.command,this.options.commandArgs);if(!this.options.noActive){this.toggleActive()}}this.ne.fireEvent("buttonClick",this)},key:function(A,B){if(this.options.key&&B.ctrlKey&&String.fromCharCode(B.keyCode||B.charCode).toLowerCase()==this.options.key){this.mouseClick();if(B.preventDefault){B.preventDefault()}}}});
-var nicPlugin=bkClass.extend({construct:function(B,A){this.options=A;this.ne=B;this.ne.addEvent("panel",this.loadPanel.closure(this));this.init()},loadPanel:function(C){var B=this.options.buttons;for(var A in B){C.addButton(A,this.options)}C.reorder()},init:function(){}});
-
+ iconList : {"xhtml":1,"bgcolor":2,"forecolor":3,"bold":4,"center":5,"hr":6,"indent":7,"italic":8,"justify":9,"left":10,"ol":11,"outdent":12,"removeformat":13,"right":14,"save":25,"strikethrough":16,"subscript":17,"superscript":18,"ul":19,"underline":20,"image":21,"link":22,"unlink":23,"close":24,"arrow":26,"upload":27},
+ initWithLineBreak: true
+});
+/* END CONFIG */
+
+
+var nicEditors = {
+ nicPlugins : [],
+ editors : [],
+
+ registerPlugin : function(plugin,options) {
+ this.nicPlugins.push({p : plugin, o : options});
+ },
+
+ allTextAreas : function(nicOptions) {
+ var textareas = document.getElementsByTagName("textarea");
+ for(var i=0;i<textareas.length;i++) {
+ nicEditors.editors.push(new nicEditor(nicOptions).panelInstance(textareas[i]));
+ }
+ return nicEditors.editors;
+ },
+
+ findEditor : function(e) {
+ var editors = nicEditors.editors;
+ for(var i=0;i<editors.length;i++) {
+ if(editors[i].instanceById(e)) {
+ return editors[i]; // r is an instance of nicEditorInstance therefore it does not have removeInstance or removePanel methods
+ }
+ }
+ }
+};
+
+
+var nicEditor = bkClass.extend({
+ construct : function(o) {
+ this.options = new nicEditorConfig();
+ bkExtend(this.options,o);
+ this.nicInstances = new Array();
+ this.loadedPlugins = new Array();
+
+ var plugins = nicEditors.nicPlugins;
+ for(var i=0;i<plugins.length;i++) {
+ this.loadedPlugins.push(new plugins[i].p(this,plugins[i].o));
+ }
+ nicEditors.editors.push(this);
+ bkLib.addEvent(document.body,'mousedown', this.selectCheck.closureListener(this) );
+ },
+
+ panelInstance : function(e,o) {
+ e = this.checkReplace($BK(e));
+ var panelElm = new bkElement('DIV').setStyle({width : (parseInt(e.getStyle('width')) || e.clientWidth)+'px'}).appendBefore(e);
+ this.setPanel(panelElm);
+ return this.addInstance(e,o);
+ },
+
+ checkReplace : function(e) {
+ var r = nicEditors.findEditor(e);
+ if(r) {
+ r.removeInstance(e);
+ r.removePanel();
+ }
+ return e;
+ },
+
+ addInstance : function(e,o) {
+ e = this.checkReplace($BK(e));
+ if( e.contentEditable || !!window.opera ) {
+ var newInstance = new nicEditorInstance(e,o,this);
+ } else {
+ var newInstance = new nicEditorIFrameInstance(e,o,this);
+ }
+ this.nicInstances.push(newInstance);
+ return this;
+ },
+
+ removeInstance : function(e) {
+ e = $BK(e);
+ var instances = this.nicInstances;
+ for(var i=0;i<instances.length;i++) {
+ if(instances[i].e == e) {
+ instances[i].remove();
+ this.nicInstances.splice(i,1);
+ }
+ }
+ },
+
+ removePanel : function(e) {
+ if(this.nicPanel) {
+ this.nicPanel.remove();
+ this.nicPanel = null;
+ }
+ },
+
+ instanceById : function(e) {
+ e = $BK(e);
+ var instances = this.nicInstances;
+ for(var i=0;i<instances.length;i++) {
+ if(instances[i].e == e) {
+ return instances[i];
+ }
+ }
+ },
+
+ setPanel : function(e) {
+ this.nicPanel = new nicEditorPanel($BK(e),this.options,this);
+ this.fireEvent('panel',this.nicPanel);
+ return this;
+ },
+
+ nicCommand : function(cmd,args) {
+ if(this.selectedInstance) {
+ this.selectedInstance.nicCommand(cmd,args);
+ }
+ },
+
+ getIcon : function(iconName,options) {
+ var icon = this.options.iconList[iconName];
+ var file = (options.iconFiles) ? options.iconFiles[iconName] : '';
+ return {backgroundImage : "url('"+((icon) ? this.options.iconsPath : file)+"')", backgroundPosition : ((icon) ? ((icon-1)*-18) : 0)+'px 0px'};
+ },
+
+ selectCheck : function(e,t) {
+ var found = false;
+ do{
+ if(t.className && t.className.indexOf('nicEdit') != -1) {
+ return false;
+ }
+ } while(t = t.parentNode);
+ this.fireEvent('blur',this.selectedInstance,t);
+ this.lastSelectedInstance = this.selectedInstance;
+ this.selectedInstance = null;
+ return false;
+ }
+
+});
+nicEditor = nicEditor.extend(bkEvent);
+
+
+var nicEditorInstance = bkClass.extend({
+ isSelected : false,
+
+ construct : function(e,options,nicEditor) {
+ this.ne = nicEditor;
+ this.elm = this.e = e;
+ this.options = options || {};
+
+ newX = parseInt(e.getStyle('width')) || e.clientWidth;
+ newY = parseInt(e.getStyle('height')) || e.clientHeight;
+ this.initialHeight = newY-8;
+
+ var isTextarea = (e.nodeName.toLowerCase() == "textarea");
+ if(isTextarea || this.options.hasPanel) {
+ var ie7s = (bkLib.isMSIE && !((typeof document.body.style.maxHeight != "undefined") && document.compatMode == "CSS1Compat"))
+ var s = {width: newX+'px', border : '1px solid #ccc', borderTop : 0, overflowY : 'auto', overflowX: 'hidden' };
+ s[(ie7s) ? 'height' : 'maxHeight'] = (this.ne.options.maxHeight) ? this.ne.options.maxHeight+'px' : null;
+ this.editorContain = new bkElement('DIV').setStyle(s).appendBefore(e);
+ var editorElm = new bkElement('DIV').setStyle({width : (newX-8)+'px', margin: '4px', minHeight : newY+'px'}).addClass('main').appendTo(this.editorContain);
+
+ e.setStyle({display : 'none'});
+
+ editorElm.innerHTML = e.innerHTML;
+ if(isTextarea) {
+ editorElm.setContent(e.value);
+ this.copyElm = e;
+ var f = e.parentTag('FORM');
+ if(f) { bkLib.addEvent( f, 'submit', this.saveContent.closure(this)); }
+ }
+ editorElm.setStyle((ie7s) ? {height : newY+'px'} : {overflow: 'hidden'});
+ this.elm = editorElm;
+ }
+ this.ne.addEvent('blur',this.blur.closure(this));
+
+ this.init();
+ this.blur();
+ },
+
+ init : function() {
+ this.elm.setAttribute('contentEditable','true');
+ if(this.getContent() == "" && this.options.initWithLineBreak) {
+ this.setContent('<br />');
+ }
+ this.instanceDoc = document.defaultView;
+ this.elm.addEvent('mousedown',this.selected.closureListener(this)).addEvent('keypress',this.keyDown.closureListener(this)).addEvent('focus',this.selected.closure(this)).addEvent('blur',this.blur.closure(this)).addEvent('keyup',this.selected.closure(this));
+ this.ne.fireEvent('add',this);
+ },
+
+ remove : function() {
+ this.saveContent();
+ if(this.copyElm || this.options.hasPanel) {
+ this.editorContain.remove();
+ this.e.setStyle({'display' : 'block'});
+ this.ne.removePanel();
+ }
+ this.disable();
+ this.ne.fireEvent('remove',this);
+ },
+
+ disable : function() {
+ this.elm.setAttribute('contentEditable','false');
+ },
+
+ getSel : function() {
+ return (window.getSelection) ? window.getSelection() : document.selection;
+ },
+
+ getRng : function() {
+ var s = this.getSel();
+ if(!s) { return null; }
+ return (s.rangeCount > 0) ? s.getRangeAt(0) :
+ s.createRange && s.createRange() || document.createRange();
+ },
+
+ selRng : function(rng,s) {
+ if(window.getSelection) {
+ s.removeAllRanges();
+ s.addRange(rng);
+ } else {
+ rng.select();
+ }
+ },
+
+ selElm : function() {
+ var r = this.getRng();
+ if(r.startContainer) {
+ var contain = r.startContainer;
+ if(r.cloneContents().childNodes.length == 1) {
+ for(var i=0;i<contain.childNodes.length;i++) {
+ var rng = contain.childNodes[i].ownerDocument.createRange();
+ rng.selectNode(contain.childNodes[i]);
+ if(r.compareBoundaryPoints(Range.START_TO_START,rng) != 1 &&
+ r.compareBoundaryPoints(Range.END_TO_END,rng) != -1) {
+ return $BK(contain.childNodes[i]);
+ }
+ }
+ }
+ return $BK(contain);
+ } else {
+ return $BK((this.getSel().type == "Control") ? r.item(0) : r.parentElement());
+ }
+ },
+
+ saveRng : function() {
+ this.savedRange = this.getRng();
+ this.savedSel = this.getSel();
+ },
+
+ restoreRng : function() {
+ if(this.savedRange) {
+ this.selRng(this.savedRange,this.savedSel);
+ }
+ },
+
+ keyDown : function(e,t) {
+ this.ne.fireEvent('keyDown',this,e);
+
+ if(e.ctrlKey) {
+ this.ne.fireEvent('key',this,e);
+ }
+ },
+
+ selected : function(e,t) {
+ if(!t) {t = this.selElm()}
+ if(!e.ctrlKey) {
+ var selInstance = this.ne.selectedInstance;
+ if(selInstance != this) {
+ if(selInstance) {
+ this.ne.fireEvent('blur',selInstance,t);
+ }
+ this.ne.selectedInstance = this;
+ this.ne.fireEvent('focus',selInstance,t);
+ }
+ this.ne.fireEvent('selected',selInstance,t);
+ this.isFocused = true;
+ this.elm.addClass('selected');
+ }
+ return false;
+ },
+
+ blur : function() {
+ this.isFocused = false;
+ this.elm.removeClass('selected');
+ },
+
+ saveContent : function() {
+ if(this.copyElm || this.options.hasPanel) {
+ this.ne.fireEvent('save',this);
+ (this.copyElm) ? this.copyElm.value = this.getContent() : this.e.innerHTML = this.getContent();
+ }
+ },
+
+ getElm : function() {
+ return this.elm;
+ },
+
+ getContent : function() {
+ this.content = this.getElm().innerHTML;
+ this.ne.fireEvent('get',this);
+ return this.content;
+ },
+
+ setContent : function(e) {
+ this.content = e;
+ this.ne.fireEvent('set',this);
+ this.elm.innerHTML = this.content;
+ },
+
+ nicCommand : function(cmd,args) {
+ document.execCommand(cmd,false,args);
+ }
+});
+
+var nicEditorIFrameInstance = nicEditorInstance.extend({
+ savedStyles : [],
+
+ init : function() {
+ var c = this.elm.innerHTML.replace(/^\s+|\s+$/g, '');
+ this.elm.innerHTML = '';
+ (!c) ? c = "<br />" : c;
+ this.initialContent = c;
+
+ this.elmFrame = new bkElement('iframe').setAttributes({'src' : 'javascript:;', 'frameBorder' : 0, 'allowTransparency' : 'true', 'scrolling' : 'no'}).setStyle({height: '100px', width: '100%'}).addClass('frame').appendTo(this.elm);
+
+ if(this.copyElm) { this.elmFrame.setStyle({width : (this.elm.offsetWidth-4)+'px'}); }
+
+ var styleList = ['font-size','font-family','font-weight','color'];
+ for(itm in styleList) {
+ this.savedStyles[bkLib.camelize(itm)] = this.elm.getStyle(itm);
+ }
+
+ setTimeout(this.initFrame.closure(this),50);
+ },
+
+ disable : function() {
+ this.elm.innerHTML = this.getContent();
+ },
+
+ initFrame : function() {
+ var fd = $BK(this.elmFrame.contentWindow.document);
+ fd.designMode = "on";
+ fd.open();
+ var css = this.ne.options.externalCSS;
+ fd.write('<html><head>'+((css) ? '<link href="'+css+'" rel="stylesheet" type="text/css" />' : '')+'</head><body id="nicEditContent" style="margin: 0 !important; background-color: transparent !important;">'+this.initialContent+'</body></html>');
+ fd.close();
+ this.frameDoc = fd;
+
+ this.frameWin = $BK(this.elmFrame.contentWindow);
+ this.frameContent = $BK(this.frameWin.document.body).setStyle(this.savedStyles);
+ this.instanceDoc = this.frameWin.document.defaultView;
+
+ this.heightUpdate();
+ this.frameDoc.addEvent('mousedown', this.selected.closureListener(this)).addEvent('keyup',this.heightUpdate.closureListener(this)).addEvent('keydown',this.keyDown.closureListener(this)).addEvent('keyup',this.selected.closure(this));
+ this.ne.fireEvent('add',this);
+ },
+
+ getElm : function() {
+ return this.frameContent;
+ },
+
+ setContent : function(c) {
+ this.content = c;
+ this.ne.fireEvent('set',this);
+ this.frameContent.innerHTML = this.content;
+ this.heightUpdate();
+ },
+
+ getSel : function() {
+ return (this.frameWin) ? this.frameWin.getSelection() : this.frameDoc.selection;
+ },
+
+ heightUpdate : function() {
+ this.elmFrame.style.height = Math.max(this.frameContent.offsetHeight,this.initialHeight)+'px';
+ },
+
+ nicCommand : function(cmd,args) {
+ this.frameDoc.execCommand(cmd,false,args);
+ setTimeout(this.heightUpdate.closure(this),100);
+ }
+
+
+});
+var nicEditorPanel = bkClass.extend({
+ construct : function(e,options,nicEditor) {
+ this.elm = e;
+ this.options = options;
+ this.ne = nicEditor;
+ this.panelButtons = new Array();
+ this.buttonList = bkExtend([],this.ne.options.buttonList);
+
+ this.panelContain = new bkElement('DIV').setStyle({overflow : 'hidden', width : '100%', border : '1px solid #cccccc', backgroundColor : '#efefef'}).addClass('panelContain');
+ this.panelElm = new bkElement('DIV').setStyle({margin : '2px', marginTop : '0px', zoom : 1, overflow : 'hidden'}).addClass('panel').appendTo(this.panelContain);
+ this.panelContain.appendTo(e);
+
+ var opt = this.ne.options;
+ var buttons = opt.buttons;
+ for(button in buttons) {
+ this.addButton(button,opt,true);
+ }
+ this.reorder();
+ e.noSelect();
+ },
+
+ addButton : function(buttonName,options,noOrder) {
+ var button = options.buttons[buttonName];
+ var type = (button['type']) ? eval('(typeof('+button['type']+') == "undefined") ? null : '+button['type']+';') : nicEditorButton;
+ var hasButton = bkLib.inArray(this.buttonList,buttonName);
+ if(type && (hasButton || this.ne.options.fullPanel)) {
+ this.panelButtons.push(new type(this.panelElm,buttonName,options,this.ne));
+ if(!hasButton) {
+ this.buttonList.push(buttonName);
+ }
+ }
+ },
+
+ findButton : function(itm) {
+ for(var i=0;i<this.panelButtons.length;i++) {
+ if(this.panelButtons[i].name == itm)
+ return this.panelButtons[i];
+ }
+ },
+
+ reorder : function() {
+ var bl = this.buttonList;
+ for(var i=0;i<bl.length;i++) {
+ var button = this.findButton(bl[i]);
+ if(button) {
+ this.panelElm.appendChild(button.margin);
+ }
+ }
+ },
+
+ remove : function() {
+ this.elm.remove();
+ }
+});
+var nicEditorButton = bkClass.extend({
+
+ construct : function(e,buttonName,options,nicEditor) {
+ this.options = options.buttons[buttonName];
+ this.name = buttonName;
+ this.ne = nicEditor;
+ this.elm = e;
+
+ this.margin = new bkElement('DIV').setStyle({'float' : 'left', marginTop : '2px'}).appendTo(e);
+ this.contain = new bkElement('DIV').setStyle({width : '20px', height : '20px'}).addClass('buttonContain').appendTo(this.margin);
+ this.border = new bkElement('DIV').setStyle({backgroundColor : '#efefef', border : '1px solid #efefef'}).appendTo(this.contain);
+ this.button = new bkElement('DIV').setStyle({width : '18px', height : '18px', overflow : 'hidden', zoom : 1, cursor : 'pointer'}).addClass('button').setStyle(this.ne.getIcon(buttonName,options)).appendTo(this.border);
+ this.button.addEvent('mouseover', this.hoverOn.closure(this)).addEvent('mouseout',this.hoverOff.closure(this)).addEvent('mousedown',this.mouseClick.closure(this)).noSelect();
+
+ if(!window.opera) {
+ this.button.onmousedown = this.button.onclick = bkLib.cancelEvent;
+ }
+
+ nicEditor.addEvent('selected', this.enable.closure(this)).addEvent('blur', this.disable.closure(this)).addEvent('key',this.key.closure(this));
+
+ this.disable();
+ this.init();
+ },
+
+ init : function() { },
+
+ hide : function() {
+ this.contain.setStyle({display : 'none'});
+ },
+
+ updateState : function() {
+ if(this.isDisabled) { this.setBg(); }
+ else if(this.isHover) { this.setBg('hover'); }
+ else if(this.isActive) { this.setBg('active'); }
+ else { this.setBg(); }
+ },
+
+ setBg : function(state) {
+ switch(state) {
+ case 'hover':
+ var stateStyle = {border : '1px solid #666', backgroundColor : '#ddd'};
+ break;
+ case 'active':
+ var stateStyle = {border : '1px solid #666', backgroundColor : '#ccc'};
+ break;
+ default:
+ var stateStyle = {border : '1px solid #efefef', backgroundColor : '#efefef'};
+ }
+ this.border.setStyle(stateStyle).addClass('button-'+state);
+ },
+
+ checkNodes : function(e) {
+ var elm = e;
+ do {
+ if(this.options.tags && bkLib.inArray(this.options.tags,elm.nodeName)) {
+ this.activate();
+ return true;
+ }
+ } while((elm = elm.parentNode) && elm.className != "nicEdit");
+ elm = $BK(e);
+ while(elm.nodeType == 3) {
+ elm = $BK(elm.parentNode);
+ }
+ if(this.options.css) {
+ for(itm in this.options.css) {
+ if(elm.getStyle(itm,this.ne.selectedInstance.instanceDoc) == this.options.css[itm]) {
+ this.activate();
+ return true;
+ }
+ }
+ }
+ this.deactivate();
+ return false;
+ },
+
+ activate : function() {
+ if(!this.isDisabled) {
+ this.isActive = true;
+ this.updateState();
+ this.ne.fireEvent('buttonActivate',this);
+ }
+ },
+
+ deactivate : function() {
+ this.isActive = false;
+ this.updateState();
+ if(!this.isDisabled) {
+ this.ne.fireEvent('buttonDeactivate',this);
+ }
+ },
+
+ enable : function(ins,t) {
+ this.isDisabled = false;
+ this.contain.setStyle({'opacity' : 1}).addClass('buttonEnabled');
+ this.updateState();
+ if (t !== document) {
+ this.checkNodes(t);
+ }
+ },
+
+ disable : function(ins,t) {
+ this.isDisabled = true;
+ this.contain.setStyle({'opacity' : 0.6}).removeClass('buttonEnabled');
+ this.updateState();
+ },
+
+ toggleActive : function() {
+ (this.isActive) ? this.deactivate() : this.activate();
+ },
+ hoverOn : function() {
+ if(!this.isDisabled) {
+ this.isHover = true;
+ this.updateState();
+ this.ne.fireEvent("buttonOver",this);
+ }
+ },
+
+ hoverOff : function() {
+ this.isHover = false;
+ this.updateState();
+ this.ne.fireEvent("buttonOut",this);
+ },
+
+ mouseClick : function() {
+ if(this.options.command) {
+ this.ne.nicCommand(this.options.command,this.options.commandArgs);
+ if(!this.options.noActive) {
+ this.toggleActive();
+ }
+ }
+ this.ne.fireEvent("buttonClick",this);
+ },
+
+ key : function(nicInstance,e) {
+ if(this.options.key && e.ctrlKey && String.fromCharCode(e.keyCode || e.charCode).toLowerCase() == this.options.key) {
+ this.mouseClick();
+ if(e.preventDefault) e.preventDefault();
+ }
+ }
+
+});
+
+
+var nicPlugin = bkClass.extend({
+
+ construct : function(nicEditor,options) {
+ this.options = options;
+ this.ne = nicEditor;
+ this.ne.addEvent('panel',this.loadPanel.closure(this));
+
+ this.init();
+ },
+
+ loadPanel : function(np) {
+ var buttons = this.options.buttons;
+ for(var button in buttons) {
+ np.addButton(button,this.options);
+ }
+ np.reorder();
+ },
+
+ init : function() { }
+});
+
+
+
+
+ /* START CONFIG */
var nicPaneOptions = { };
+/* END CONFIG */
+
+var nicEditorPane = bkClass.extend({
+ construct : function(elm,nicEditor,options,openButton) {
+ this.ne = nicEditor;
+ this.elm = elm;
+ this.pos = elm.pos();
+
+ this.contain = new bkElement('div').setStyle({zIndex : '99999', overflow : 'hidden', position : 'absolute', left : this.pos[0]+'px', top : this.pos[1]+'px'})
+ this.pane = new bkElement('div').setStyle({fontSize : '12px', border : '1px solid #ccc', 'overflow': 'hidden', padding : '4px', textAlign: 'left', backgroundColor : '#ffffc9'}).addClass('pane').setStyle(options).appendTo(this.contain);
+
+ if(openButton && !openButton.options.noClose) {
+ this.close = new bkElement('div').setStyle({'float' : 'right', height: '16px', width : '16px', cursor : 'pointer'}).setStyle(this.ne.getIcon('close',nicPaneOptions)).addEvent('mousedown',openButton.removePane.closure(this)).appendTo(this.pane);
+ }
+
+ this.contain.noSelect().appendTo(document.body);
+
+ this.position();
+ this.init();
+ },
-var nicEditorPane=bkClass.extend({construct:function(D,C,B,A){this.ne=C;this.elm=D;this.pos=D.pos();this.contain=new bkElement("div").setStyle({zIndex:"99999",overflow:"hidden",position:"absolute",left:this.pos[0]+"px",top:this.pos[1]+"px"});this.pane=new bkElement("div").setStyle({fontSize:"12px",border:"1px solid #ccc",overflow:"hidden",padding:"4px",textAlign:"left",backgroundColor:"#ffffc9"}).addClass("pane").setStyle(B).appendTo(this.contain);if(A&&!A.options.noClose){this.close=new bkElement("div").setStyle({"float":"right",height:"16px",width:"16px",cursor:"pointer"}).setStyle(this.ne.getIcon("close",nicPaneOptions)).addEvent("mousedown",A.removePane.closure(this)).appendTo(this.pane)}this.contain.noSelect().appendTo(document.body);this.position();this.init()},init:function(){},position:function(){if(this.ne.nicPanel){var B=this.ne.nicPanel.elm;var A=B.pos();var C=A[0]+parseInt(B.getStyle("width"))-(parseInt(this.pane.getStyle("width"))+8);if(C<this.pos[0]){this.contain.setStyle({left:C+"px"})}}},toggle:function(){this.isVisible=!this.isVisible;this.contain.setStyle({display:((this.isVisible)?"block":"none")})},remove:function(){if(this.contain){this.contain.remove();this.contain=null}},append:function(A){A.appendTo(this.pane)},setContent:function(A){this.pane.setContent(A)}});
-
-var nicEditorAdvancedButton=nicEditorButton.extend({init:function(){this.ne.addEvent("selected",this.removePane.closure(this)).addEvent("blur",this.removePane.closure(this))},mouseClick:function(){if(!this.isDisabled){if(this.pane&&this.pane.pane){this.removePane()}else{this.pane=new nicEditorPane(this.contain,this.ne,{width:(this.width||"270px"),backgroundColor:"#fff"},this);this.addPane();this.ne.selectedInstance.saveRng()}}},addForm:function(C,G){this.form=new bkElement("form").addEvent("submit",this.submit.closureListener(this));this.pane.append(this.form);this.inputs={};for(itm in C){var D=C[itm];var F="";if(G){F=G.getAttribute(itm)}if(!F){F=D.value||""}var A=C[itm].type;if(A=="title"){new bkElement("div").setContent(D.txt).setStyle({fontSize:"14px",fontWeight:"bold",padding:"0px",margin:"2px 0"}).appendTo(this.form)}else{var B=new bkElement("div").setStyle({overflow:"hidden",clear:"both"}).appendTo(this.form);if(D.txt){new bkElement("label").setAttributes({"for":itm}).setContent(D.txt).setStyle({margin:"2px 4px",fontSize:"13px",width:"50px",lineHeight:"20px",textAlign:"right","float":"left"}).appendTo(B)}switch(A){case"text":this.inputs[itm]=new bkElement("input").setAttributes({id:itm,value:F,type:"text"}).setStyle({margin:"2px 0",fontSize:"13px","float":"left",height:"20px",border:"1px solid #ccc",overflow:"hidden"}).setStyle(D.style).appendTo(B);break;case"select":this.inputs[itm]=new bkElement("select").setAttributes({id:itm}).setStyle({border:"1px solid #ccc","float":"left",margin:"2px 0"}).appendTo(B);for(opt in D.options){var E=new bkElement("option").setAttributes({value:opt,selected:(opt==F)?"selected":""}).setContent(D.options[opt]).appendTo(this.inputs[itm])}break;case"content":this.inputs[itm]=new bkElement("textarea").setAttributes({id:itm}).setStyle({border:"1px solid #ccc","float":"left"}).setStyle(D.style).appendTo(B);this.inputs[itm].value=F}}}new bkElement("input").setAttributes({type:"submit"}).setStyle({backgroundColor:"#efefef",border:"1px solid #ccc",margin:"3px 0","float":"left",clear:"both"}).appendTo(this.form);this.form.onsubmit=bkLib.cancelEvent},submit:function(){},findElm:function(B,A,E){var D=this.ne.selectedInstance.getElm().getElementsByTagName(B);for(var C=0;C<D.length;C++){if(D[C].getAttribute(A)==E){return $BK(D[C])}}},removePane:function(){if(this.pane){this.pane.remove();this.pane=null;this.ne.selectedInstance.restoreRng()}}});
-
-var nicButtonTips=bkClass.extend({construct:function(A){this.ne=A;A.addEvent("buttonOver",this.show.closure(this)).addEvent("buttonOut",this.hide.closure(this))},show:function(A){this.timer=setTimeout(this.create.closure(this,A),400)},create:function(A){this.timer=null;if(!this.pane){this.pane=new nicEditorPane(A.button,this.ne,{fontSize:"12px",marginTop:"5px"});this.pane.setContent(A.options.name)}},hide:function(A){if(this.timer){clearTimeout(this.timer)}if(this.pane){this.pane=this.pane.remove()}}});nicEditors.registerPlugin(nicButtonTips);
-
+ init : function() { },
+ position : function() {
+ if(this.ne.nicPanel) {
+ var panelElm = this.ne.nicPanel.elm;
+ var panelPos = panelElm.pos();
+ var newLeft = panelPos[0]+parseInt(panelElm.getStyle('width'))-(parseInt(this.pane.getStyle('width'))+8);
+ if(newLeft < this.pos[0]) {
+ this.contain.setStyle({left : newLeft+'px'});
+ }
+ }
+ },
+
+ toggle : function() {
+ this.isVisible = !this.isVisible;
+ this.contain.setStyle({display : ((this.isVisible) ? 'block' : 'none')});
+ },
+
+ remove : function() {
+ if(this.contain) {
+ this.contain.remove();
+ this.contain = null;
+ }
+ },
+
+ append : function(c) {
+ c.appendTo(this.pane);
+ },
+
+ setContent : function(c) {
+ this.pane.setContent(c);
+ }
+
+});
+
+
+
+var nicEditorAdvancedButton = nicEditorButton.extend({
+
+ init : function() {
+ this.ne.addEvent('selected',this.removePane.closure(this)).addEvent('blur',this.removePane.closure(this));
+ },
+
+ mouseClick : function() {
+ if(!this.isDisabled) {
+ if(this.pane && this.pane.pane) {
+ this.removePane();
+ } else {
+ this.pane = new nicEditorPane(this.contain,this.ne,{width : (this.width || '270px'), backgroundColor : '#fff'},this);
+ this.addPane();
+ this.ne.selectedInstance.saveRng();
+ }
+ }
+ },
+
+ addForm : function(f,elm) {
+ this.form = new bkElement('form').addEvent('submit',this.submit.closureListener(this));
+ this.pane.append(this.form);
+ this.inputs = {};
+
+ for(itm in f) {
+ var field = f[itm];
+ var val = '';
+ if(elm) {
+ val = elm.getAttribute(itm);
+ }
+ if(!val) {
+ val = field['value'] || '';
+ }
+ var type = f[itm].type;
+
+ if(type == 'title') {
+ new bkElement('div').setContent(field.txt).setStyle({fontSize : '14px', fontWeight: 'bold', padding : '0px', margin : '2px 0'}).appendTo(this.form);
+ } else {
+ var contain = new bkElement('div').setStyle({overflow : 'hidden', clear : 'both'}).appendTo(this.form);
+ if(field.txt) {
+ new bkElement('label').setAttributes({'for' : itm}).setContent(field.txt).setStyle({margin : '2px 4px', fontSize : '13px', width: '50px', lineHeight : '20px', textAlign : 'right', 'float' : 'left'}).appendTo(contain);
+ }
+
+ switch(type) {
+ case 'text':
+ this.inputs[itm] = new bkElement('input').setAttributes({id : itm, 'value' : val, 'type' : 'text'}).setStyle({margin : '2px 0', fontSize : '13px', 'float' : 'left', height : '20px', border : '1px solid #ccc', overflow : 'hidden'}).setStyle(field.style).appendTo(contain);
+ break;
+ case 'select':
+ this.inputs[itm] = new bkElement('select').setAttributes({id : itm}).setStyle({border : '1px solid #ccc', 'float' : 'left', margin : '2px 0'}).appendTo(contain);
+ for(opt in field.options) {
+ var o = new bkElement('option').setAttributes({value : opt, selected : (opt == val) ? 'selected' : ''}).setContent(field.options[opt]).appendTo(this.inputs[itm]);
+ }
+ break;
+ case 'content':
+ this.inputs[itm] = new bkElement('textarea').setAttributes({id : itm}).setStyle({border : '1px solid #ccc', 'float' : 'left'}).setStyle(field.style).appendTo(contain);
+ this.inputs[itm].value = val;
+ }
+ }
+ }
+ new bkElement('input').setAttributes({'type' : 'submit'}).setStyle({backgroundColor : '#efefef',border : '1px solid #ccc', margin : '3px 0', 'float' : 'left', 'clear' : 'both'}).appendTo(this.form);
+ this.form.onsubmit = bkLib.cancelEvent;
+ },
+
+ submit : function() { },
+
+ findElm : function(tag,attr,val) {
+ var list = this.ne.selectedInstance.getElm().getElementsByTagName(tag);
+ for(var i=0;i<list.length;i++) {
+ if(list[i].getAttribute(attr) == val) {
+ return $BK(list[i]);
+ }
+ }
+ },
+
+ removePane : function() {
+ if(this.pane) {
+ this.pane.remove();
+ this.pane = null;
+ this.ne.selectedInstance.restoreRng();
+ }
+ }
+});
+
+
+var nicButtonTips = bkClass.extend({
+ construct : function(nicEditor) {
+ this.ne = nicEditor;
+ nicEditor.addEvent('buttonOver',this.show.closure(this)).addEvent('buttonOut',this.hide.closure(this));
+
+ },
+
+ show : function(button) {
+ this.timer = setTimeout(this.create.closure(this,button),400);
+ },
+
+ create : function(button) {
+ this.timer = null;
+ if(!this.pane) {
+ this.pane = new nicEditorPane(button.button,this.ne,{fontSize : '12px', marginTop : '5px'});
+ this.pane.setContent(button.options.name);
+ }
+ },
+
+ hide : function(button) {
+ if(this.timer) {
+ clearTimeout(this.timer);
+ }
+ if(this.pane) {
+ this.pane = this.pane.remove();
+ }
+ }
+});
+nicEditors.registerPlugin(nicButtonTips);
+
+
+
+ /* START CONFIG */
var nicSelectOptions = {
buttons : {
'fontSize' : {name : __('Select Font Size'), type : 'nicEditorFontSizeSelect', command : 'fontsize'},
@@ -58,45 +1055,705 @@ var nicSelectOptions = {
'fontFormat' : {name : __('Select Font Format'), type : 'nicEditorFontFormatSelect', command : 'formatBlock'}
}
};
+/* END CONFIG */
+var nicEditorSelect = bkClass.extend({
+
+ construct : function(e,buttonName,options,nicEditor) {
+ this.options = options.buttons[buttonName];
+ this.elm = e;
+ this.ne = nicEditor;
+ this.name = buttonName;
+ this.selOptions = new Array();
+
+ this.margin = new bkElement('div').setStyle({'float' : 'left', margin : '2px 1px 0 1px'}).appendTo(this.elm);
+ this.contain = new bkElement('div').setStyle({width: '90px', height : '20px', cursor : 'pointer', overflow: 'hidden'}).addClass('selectContain').addEvent('click',this.toggle.closure(this)).appendTo(this.margin);
+ this.items = new bkElement('div').setStyle({overflow : 'hidden', zoom : 1, border: '1px solid #ccc', paddingLeft : '3px', backgroundColor : '#fff'}).appendTo(this.contain);
+ this.control = new bkElement('div').setStyle({overflow : 'hidden', 'float' : 'right', height: '18px', width : '16px'}).addClass('selectControl').setStyle(this.ne.getIcon('arrow',options)).appendTo(this.items);
+ this.txt = new bkElement('div').setStyle({overflow : 'hidden', 'float' : 'left', width : '66px', height : '14px', marginTop : '1px', fontFamily : 'sans-serif', textAlign : 'center', fontSize : '12px'}).addClass('selectTxt').appendTo(this.items);
+
+ if(!window.opera) {
+ this.contain.onmousedown = this.control.onmousedown = this.txt.onmousedown = bkLib.cancelEvent;
+ }
+
+ this.margin.noSelect();
+
+ this.ne.addEvent('selected', this.enable.closure(this)).addEvent('blur', this.disable.closure(this));
+
+ this.disable();
+ this.init();
+ },
+
+ disable : function() {
+ this.isDisabled = true;
+ this.close();
+ this.contain.setStyle({opacity : 0.6});
+ },
+
+ enable : function(t) {
+ this.isDisabled = false;
+ this.close();
+ this.contain.setStyle({opacity : 1});
+ },
+
+ setDisplay : function(txt) {
+ this.txt.setContent(txt);
+ },
+
+ toggle : function() {
+ if(!this.isDisabled) {
+ (this.pane) ? this.close() : this.open();
+ }
+ },
+
+ open : function() {
+ this.pane = new nicEditorPane(this.items,this.ne,{width : '88px', padding: '0px', borderTop : 0, borderLeft : '1px solid #ccc', borderRight : '1px solid #ccc', borderBottom : '0px', backgroundColor : '#fff'});
+
+ for(var i=0;i<this.selOptions.length;i++) {
+ var opt = this.selOptions[i];
+ var itmContain = new bkElement('div').setStyle({overflow : 'hidden', borderBottom : '1px solid #ccc', width: '88px', textAlign : 'left', overflow : 'hidden', cursor : 'pointer'});
+ var itm = new bkElement('div').setStyle({padding : '0px 4px'}).setContent(opt[1]).appendTo(itmContain).noSelect();
+ itm.addEvent('click',this.update.closure(this,opt[0])).addEvent('mouseover',this.over.closure(this,itm)).addEvent('mouseout',this.out.closure(this,itm)).setAttributes('id',opt[0]);
+ this.pane.append(itmContain);
+ if(!window.opera) {
+ itm.onmousedown = bkLib.cancelEvent;
+ }
+ }
+ },
+
+ close : function() {
+ if(this.pane) {
+ this.pane = this.pane.remove();
+ }
+ },
+
+ over : function(opt) {
+ opt.setStyle({backgroundColor : '#ccc'});
+ },
+
+ out : function(opt) {
+ opt.setStyle({backgroundColor : '#fff'});
+ },
+
+
+ add : function(k,v) {
+ this.selOptions.push(new Array(k,v));
+ },
+
+ update : function(elm) {
+ this.ne.nicCommand(this.options.command,elm);
+ this.close();
+ }
+});
+
+var nicEditorFontSizeSelect = nicEditorSelect.extend({
+ sel : {1 : '1&nbsp;(8pt)', 2 : '2&nbsp;(10pt)', 3 : '3&nbsp;(12pt)', 4 : '4&nbsp;(14pt)', 5 : '5&nbsp;(18pt)', 6 : '6&nbsp;(24pt)'},
+ init : function() {
+ this.setDisplay('Font&nbsp;Size...');
+ for(itm in this.sel) {
+ this.add(itm,'<font size="'+itm+'">'+this.sel[itm]+'</font>');
+ }
+ }
+});
+
+var nicEditorFontFamilySelect = nicEditorSelect.extend({
+ sel : {'arial' : 'Arial','comic sans ms' : 'Comic Sans','courier new' : 'Courier New','georgia' : 'Georgia', 'helvetica' : 'Helvetica', 'impact' : 'Impact', 'times new roman' : 'Times', 'trebuchet ms' : 'Trebuchet', 'verdana' : 'Verdana'},
+
+ init : function() {
+ this.setDisplay('Font&nbsp;Family...');
+ for(itm in this.sel) {
+ this.add(itm,'<font face="'+itm+'">'+this.sel[itm]+'</font>');
+ }
+ }
+});
+
+var nicEditorFontFormatSelect = nicEditorSelect.extend({
+ sel : {'p' : 'Paragraph', 'pre' : 'Pre', 'h6' : 'Heading&nbsp;6', 'h5' : 'Heading&nbsp;5', 'h4' : 'Heading&nbsp;4', 'h3' : 'Heading&nbsp;3', 'h2' : 'Heading&nbsp;2', 'h1' : 'Heading&nbsp;1'},
+
+ init : function() {
+ this.setDisplay('Font&nbsp;Format...');
+ for(itm in this.sel) {
+ var tag = itm.toUpperCase();
+ this.add('<'+tag+'>','<'+itm+' style="padding: 0px; margin: 0px;">'+this.sel[itm]+'</'+tag+'>');
+ }
+ }
+});
+
+nicEditors.registerPlugin(nicPlugin,nicSelectOptions);
+
-var nicEditorSelect=bkClass.extend({construct:function(D,A,C,B){this.options=C.buttons[A];this.elm=D;this.ne=B;this.name=A;this.selOptions=new Array();this.margin=new bkElement("div").setStyle({"float":"left",margin:"2px 1px 0 1px"}).appendTo(this.elm);this.contain=new bkElement("div").setStyle({width:"90px",height:"20px",cursor:"pointer",overflow:"hidden"}).addClass("selectContain").addEvent("click",this.toggle.closure(this)).appendTo(this.margin);this.items=new bkElement("div").setStyle({overflow:"hidden",zoom:1,border:"1px solid #ccc",paddingLeft:"3px",backgroundColor:"#fff"}).appendTo(this.contain);this.control=new bkElement("div").setStyle({overflow:"hidden","float":"right",height:"18px",width:"16px"}).addClass("selectControl").setStyle(this.ne.getIcon("arrow",C)).appendTo(this.items);this.txt=new bkElement("div").setStyle({overflow:"hidden","float":"left",width:"66px",height:"14px",marginTop:"1px",fontFamily:"sans-serif",textAlign:"center",fontSize:"12px"}).addClass("selectTxt").appendTo(this.items);if(!window.opera){this.contain.onmousedown=this.control.onmousedown=this.txt.onmousedown=bkLib.cancelEvent}this.margin.noSelect();this.ne.addEvent("selected",this.enable.closure(this)).addEvent("blur",this.disable.closure(this));this.disable();this.init()},disable:function(){this.isDisabled=true;this.close();this.contain.setStyle({opacity:0.6})},enable:function(A){this.isDisabled=false;this.close();this.contain.setStyle({opacity:1})},setDisplay:function(A){this.txt.setContent(A)},toggle:function(){if(!this.isDisabled){(this.pane)?this.close():this.open()}},open:function(){this.pane=new nicEditorPane(this.items,this.ne,{width:"88px",padding:"0px",borderTop:0,borderLeft:"1px solid #ccc",borderRight:"1px solid #ccc",borderBottom:"0px",backgroundColor:"#fff"});for(var C=0;C<this.selOptions.length;C++){var B=this.selOptions[C];var A=new bkElement("div").setStyle({overflow:"hidden",borderBottom:"1px solid #ccc",width:"88px",textAlign:"left",overflow:"hidden",cursor:"pointer"});var D=new bkElement("div").setStyle({padding:"0px 4px"}).setContent(B[1]).appendTo(A).noSelect();D.addEvent("click",this.update.closure(this,B[0])).addEvent("mouseover",this.over.closure(this,D)).addEvent("mouseout",this.out.closure(this,D)).setAttributes("id",B[0]);this.pane.append(A);if(!window.opera){D.onmousedown=bkLib.cancelEvent}}},close:function(){if(this.pane){this.pane=this.pane.remove()}},over:function(A){A.setStyle({backgroundColor:"#ccc"})},out:function(A){A.setStyle({backgroundColor:"#fff"})},add:function(B,A){this.selOptions.push(new Array(B,A))},update:function(A){this.ne.nicCommand(this.options.command,A);this.close()}});var nicEditorFontSizeSelect=nicEditorSelect.extend({sel:{1:"1&nbsp;(8pt)",2:"2&nbsp;(10pt)",3:"3&nbsp;(12pt)",4:"4&nbsp;(14pt)",5:"5&nbsp;(18pt)",6:"6&nbsp;(24pt)"},init:function(){this.setDisplay("Font&nbsp;Size...");for(itm in this.sel){this.add(itm,'<font size="'+itm+'">'+this.sel[itm]+"</font>")}}});var nicEditorFontFamilySelect=nicEditorSelect.extend({sel:{arial:"Arial","comic sans ms":"Comic Sans","courier new":"Courier New",georgia:"Georgia",helvetica:"Helvetica",impact:"Impact","times new roman":"Times","trebuchet ms":"Trebuchet",verdana:"Verdana"},init:function(){this.setDisplay("Font&nbsp;Family...");for(itm in this.sel){this.add(itm,'<font face="'+itm+'">'+this.sel[itm]+"</font>")}}});var nicEditorFontFormatSelect=nicEditorSelect.extend({sel:{p:"Paragraph",pre:"Pre",h6:"Heading&nbsp;6",h5:"Heading&nbsp;5",h4:"Heading&nbsp;4",h3:"Heading&nbsp;3",h2:"Heading&nbsp;2",h1:"Heading&nbsp;1"},init:function(){this.setDisplay("Font&nbsp;Format...");for(itm in this.sel){var A=itm.toUpperCase();this.add("<"+A+">","<"+itm+' style="padding: 0px; margin: 0px;">'+this.sel[itm]+"</"+A+">")}}});nicEditors.registerPlugin(nicPlugin,nicSelectOptions);
-
+/* START CONFIG */
var nicLinkOptions = {
buttons : {
'link' : {name : 'Add Link', type : 'nicLinkButton', tags : ['A']},
'unlink' : {name : 'Remove Link', command : 'unlink', noActive : true}
}
};
+/* END CONFIG */
+
+var nicLinkButton = nicEditorAdvancedButton.extend({
+ addPane : function() {
+ this.ln = this.ne.selectedInstance.selElm().parentTag('A');
+ this.addForm({
+ '' : {type : 'title', txt : 'Add/Edit Link'},
+ 'href' : {type : 'text', txt : 'URL', value : 'http://', style : {width: '150px'}},
+ 'title' : {type : 'text', txt : 'Title'},
+ 'target' : {type : 'select', txt : 'Open In', options : {'' : 'Current Window', '_blank' : 'New Window'},style : {width : '100px'}}
+ },this.ln);
+ },
+
+ submit : function(e) {
+ var url = this.inputs['href'].value;
+ if(url == "http://" || url == "") {
+ alert("You must enter a URL to Create a Link");
+ return false;
+ }
+ this.removePane();
+
+ if(!this.ln) {
+ var tmp = 'javascript:nicTemp();';
+ this.ne.nicCommand("createlink",tmp);
+ this.ln = this.findElm('A','href',tmp);
+ // set the link text to the title or the url if there is no text selected
+ if (this.ln.innerHTML == tmp) {
+ this.ln.innerHTML = this.inputs['title'].value || url;
+ };
+ }
+ if(this.ln) {
+ var oldTitle = this.ln.title;
+ this.ln.setAttributes({
+ href : this.inputs['href'].value,
+ title : this.inputs['title'].value,
+ target : this.inputs['target'].options[this.inputs['target'].selectedIndex].value
+ });
+ // set the link text to the title or the url if the old text was the old title
+ if (this.ln.innerHTML == oldTitle) {
+ this.ln.innerHTML = this.inputs['title'].value || this.inputs['href'].value;
+ };
+ }
+ }
+});
+
+nicEditors.registerPlugin(nicPlugin,nicLinkOptions);
-var nicLinkButton=nicEditorAdvancedButton.extend({addPane:function(){this.ln=this.ne.selectedInstance.selElm().parentTag("A");this.addForm({"":{type:"title",txt:"Add/Edit Link"},href:{type:"text",txt:"URL",value:"http://",style:{width:"150px"}},title:{type:"text",txt:"Title"},target:{type:"select",txt:"Open In",options:{"":"Current Window",_blank:"New Window"},style:{width:"100px"}}},this.ln)},submit:function(C){var A=this.inputs.href.value;if(A=="http://"||A==""){alert("You must enter a URL to Create a Link");return false}this.removePane();if(!this.ln){var B="javascript:nicTemp();";this.ne.nicCommand("createlink",B);this.ln=this.findElm("A","href",B)}if(this.ln){this.ln.setAttributes({href:this.inputs.href.value,title:this.inputs.title.value,target:this.inputs.target.options[this.inputs.target.selectedIndex].value})}}});nicEditors.registerPlugin(nicPlugin,nicLinkOptions);
-
+
+/* START CONFIG */
var nicColorOptions = {
buttons : {
'forecolor' : {name : __('Change Text Color'), type : 'nicEditorColorButton', noClose : true},
'bgcolor' : {name : __('Change Background Color'), type : 'nicEditorBgColorButton', noClose : true}
}
};
+/* END CONFIG */
+
+var nicEditorColorButton = nicEditorAdvancedButton.extend({
+ addPane : function() {
+ var colorList = {0 : '00',1 : '33',2 : '66',3 :'99',4 : 'CC',5 : 'FF'};
+ var colorItems = new bkElement('DIV').setStyle({width: '270px'});
+
+ for(var r in colorList) {
+ for(var b in colorList) {
+ for(var g in colorList) {
+ var colorCode = '#'+colorList[r]+colorList[g]+colorList[b];
+
+ var colorSquare = new bkElement('DIV').setStyle({'cursor' : 'pointer', 'height' : '15px', 'float' : 'left'}).appendTo(colorItems);
+ var colorBorder = new bkElement('DIV').setStyle({border: '2px solid '+colorCode}).appendTo(colorSquare);
+ var colorInner = new bkElement('DIV').setStyle({backgroundColor : colorCode, overflow : 'hidden', width : '11px', height : '11px'}).addEvent('click',this.colorSelect.closure(this,colorCode)).addEvent('mouseover',this.on.closure(this,colorBorder)).addEvent('mouseout',this.off.closure(this,colorBorder,colorCode)).appendTo(colorBorder);
+
+ if(!window.opera) {
+ colorSquare.onmousedown = colorInner.onmousedown = bkLib.cancelEvent;
+ }
+
+ }
+ }
+ }
+ this.pane.append(colorItems.noSelect());
+ },
+
+ colorSelect : function(c) {
+ this.ne.nicCommand('foreColor',c);
+ this.removePane();
+ },
+
+ on : function(colorBorder) {
+ colorBorder.setStyle({border : '2px solid #000'});
+ },
+
+ off : function(colorBorder,colorCode) {
+ colorBorder.setStyle({border : '2px solid '+colorCode});
+ }
+});
+
+var nicEditorBgColorButton = nicEditorColorButton.extend({
+ colorSelect : function(c) {
+ this.ne.nicCommand('hiliteColor',c);
+ this.removePane();
+ }
+});
+
+nicEditors.registerPlugin(nicPlugin,nicColorOptions);
-var nicEditorColorButton=nicEditorAdvancedButton.extend({addPane:function(){var D={0:"00",1:"33",2:"66",3:"99",4:"CC",5:"FF"};var H=new bkElement("DIV").setStyle({width:"270px"});for(var A in D){for(var F in D){for(var E in D){var I="#"+D[A]+D[E]+D[F];var C=new bkElement("DIV").setStyle({cursor:"pointer",height:"15px","float":"left"}).appendTo(H);var G=new bkElement("DIV").setStyle({border:"2px solid "+I}).appendTo(C);var B=new bkElement("DIV").setStyle({backgroundColor:I,overflow:"hidden",width:"11px",height:"11px"}).addEvent("click",this.colorSelect.closure(this,I)).addEvent("mouseover",this.on.closure(this,G)).addEvent("mouseout",this.off.closure(this,G,I)).appendTo(G);if(!window.opera){C.onmousedown=B.onmousedown=bkLib.cancelEvent}}}}this.pane.append(H.noSelect())},colorSelect:function(A){this.ne.nicCommand("foreColor",A);this.removePane()},on:function(A){A.setStyle({border:"2px solid #000"})},off:function(A,B){A.setStyle({border:"2px solid "+B})}});var nicEditorBgColorButton=nicEditorColorButton.extend({colorSelect:function(A){this.ne.nicCommand("hiliteColor",A);this.removePane()}});nicEditors.registerPlugin(nicPlugin,nicColorOptions);
-
+
+/* START CONFIG */
var nicImageOptions = {
buttons : {
'image' : {name : 'Add Image', type : 'nicImageButton', tags : ['IMG']}
}
-
+
};
+/* END CONFIG */
-var nicImageButton=nicEditorAdvancedButton.extend({addPane:function(){this.im=this.ne.selectedInstance.selElm().parentTag("IMG");this.addForm({"":{type:"title",txt:"Add/Edit Image"},src:{type:"text",txt:"URL",value:"http://",style:{width:"150px"}},alt:{type:"text",txt:"Alt Text",style:{width:"100px"}},align:{type:"select",txt:"Align",options:{none:"Default",left:"Left",right:"Right"}}},this.im)},submit:function(B){var C=this.inputs.src.value;if(C==""||C=="http://"){alert("You must enter a Image URL to insert");return false}this.removePane();if(!this.im){var A="javascript:nicImTemp();";this.ne.nicCommand("insertImage",A);this.im=this.findElm("IMG","src",A)}if(this.im){this.im.setAttributes({src:this.inputs.src.value,alt:this.inputs.alt.value,align:this.inputs.align.value})}}});nicEditors.registerPlugin(nicPlugin,nicImageOptions);
-
+var nicImageButton = nicEditorAdvancedButton.extend({
+ addPane : function() {
+ this.im = this.ne.selectedInstance.selElm().parentTag('IMG');
+ this.addForm({
+ '' : {type : 'title', txt : 'Add/Edit Image'},
+ 'src' : {type : 'text', txt : 'URL', 'value' : 'http://', style : {width: '150px'}},
+ 'alt' : {type : 'text', txt : 'Alt Text', style : {width: '100px'}},
+ 'align' : {type : 'select', txt : 'Align', options : {none : 'Default','left' : 'Left', 'right' : 'Right'}}
+ },this.im);
+ },
+ submit : function(e) {
+ var src = this.inputs['src'].value;
+ if(src == "" || src == "http://") {
+ alert("You must enter a Image URL to insert");
+ return false;
+ }
+ this.removePane();
+
+ if(!this.im) {
+ var tmp = 'javascript:nicImTemp();';
+ this.ne.nicCommand("insertImage",tmp);
+ this.im = this.findElm('IMG','src',tmp);
+ }
+ if(this.im) {
+ this.im.setAttributes({
+ src : this.inputs['src'].value,
+ alt : this.inputs['alt'].value,
+ align : this.inputs['align'].value
+ });
+ }
+ }
+});
+
+nicEditors.registerPlugin(nicPlugin,nicImageOptions);
+
+
+
+
+/* START CONFIG */
var nicSaveOptions = {
buttons : {
'save' : {name : __('Save this content'), type : 'nicEditorSaveButton'}
}
};
+/* END CONFIG */
+
+var nicEditorSaveButton = nicEditorButton.extend({
+ init : function() {
+ if(!this.ne.options.onSave) {
+ this.margin.setStyle({'display' : 'none'});
+ }
+ },
+ mouseClick : function() {
+ var onSave = this.ne.options.onSave;
+ var selectedInstance = this.ne.selectedInstance;
+ onSave(selectedInstance.getContent(), selectedInstance.elm.id, selectedInstance);
+ }
+});
+
+nicEditors.registerPlugin(nicPlugin,nicSaveOptions);
+
+
+
+/* START CONFIG */
+var nicUploadOptions = {
+ buttons : {
+ 'upload' : {name : 'Upload Image', type : 'nicUploadButton'}
+ }
+
+};
+/* END CONFIG */
+
+var nicUploadButton = nicEditorAdvancedButton.extend({
+ nicURI : 'http://files.nicedit.com/',
+
+ addPane : function() {
+ this.im = this.ne.selectedInstance.selElm().parentTag('IMG');
+ this.myID = Math.round(Math.random()*Math.pow(10,15));
+ this.requestInterval = 1000;
+ this.uri = this.ne.options.uploadURI || this.nicURI;
+ nicUploadButton.lastPlugin = this;
+
+ this.myFrame = new bkElement('iframe').setAttributes({ width : '100%', height : '100px', frameBorder : 0, scrolling : 'no' }).setStyle({border : 0}).appendTo(this.pane.pane);
+ this.progressWrapper = new bkElement('div').setStyle({display: 'none', width: '100%', height: '20px', border : '1px solid #ccc'}).appendTo(this.pane.pane);
+ this.progress = new bkElement('div').setStyle({width: '0%', height: '20px', backgroundColor : '#ccc'}).setContent('&nbsp').appendTo(this.progressWrapper);
+
+ setTimeout(this.addForm.closure(this),50);
+ },
+
+ addForm : function() {
+ var myDoc = this.myDoc = this.myFrame.contentWindow.document;
+ myDoc.open();
+ myDoc.write("<html><body>");
+ myDoc.write('<form method="post" action="'+this.uri+'?id='+this.myID+'" enctype="multipart/form-data">');
+ myDoc.write('<input type="hidden" name="APC_UPLOAD_PROGRESS" value="'+this.myID+'" />');
+ if(this.uri == this.nicURI) {
+ myDoc.write('<div style="position: absolute; margin-left: 160px;"><img src="http://imageshack.us/img/imageshack.png" width="30" style="float: left;" /><div style="float: left; margin-left: 5px; font-size: 10px;">Hosted by<br /><a href="http://www.imageshack.us/" target="_blank">ImageShack</a></div></div>');
+ }
+ myDoc.write('<div style="font-size: 14px; font-weight: bold; padding-top: 5px;">Insert an Image</div>');
+ myDoc.write('<input name="nicImage" type="file" style="margin-top: 10px;" />');
+ myDoc.write('</form>');
+ myDoc.write("</body></html>");
+ myDoc.close();
+
+ this.myBody = myDoc.body;
+
+ this.myForm = $BK(this.myBody.getElementsByTagName('form')[0]);
+ this.myInput = $BK(this.myBody.getElementsByTagName('input')[1]).addEvent('change', this.startUpload.closure(this));
+ this.myStatus = new bkElement('div',this.myDoc).setStyle({textAlign : 'center', fontSize : '14px'}).appendTo(this.myBody);
+ },
+
+ startUpload : function() {
+ this.myForm.setStyle({display : 'none'});
+ this.myStatus.setContent('<img src="http://files.nicedit.com/ajax-loader.gif" style="float: right; margin-right: 40px;" /><strong>Uploading...</strong><br />Please wait');
+ this.myForm.submit();
+ setTimeout(this.makeRequest.closure(this),this.requestInterval);
+ },
+
+ makeRequest : function() {
+ if(this.pane && this.pane.pane) {
+ nicUploadButton.lastPlugin = this;
+ var s = new bkElement('script').setAttributes({ type : 'text/javascript', src : this.uri+'?check='+this.myID+'&rand='+Math.round(Math.random()*Math.pow(10,15))}).addEvent('load', function() {
+ s.parentNode.removeChild(s);
+ }).appendTo(document.getElementsByTagName('head')[0]);
+ if(this.requestInterval) {
+ setTimeout(this.makeRequest.closure(this), this.requestInterval);
+ }
+ }
+ },
+
+ setProgress : function(percent) {
+ this.progressWrapper.setStyle({display: 'block'});
+ this.progress.setStyle({width : percent+'%'});
+ },
+
+ update : function(o) {
+ if(o == false) {
+ this.progressWrapper.setStyle({display : 'none'});
+ } else if(o.url) {
+ this.setProgress(100);
+ this.requestInterval = false;
+
+ if(!this.im) {
+ this.ne.selectedInstance.restoreRng();
+ var tmp = 'javascript:nicImTemp();';
+ this.ne.nicCommand("insertImage",tmp);
+ this.im = this.findElm('IMG','src',tmp);
+ }
+ var w = parseInt(this.ne.selectedInstance.elm.getStyle('width'));
+ if(this.im) {
+ this.im.setAttributes({
+ src : o.url,
+ width : (w && o.width) ? Math.min(w,o.width) : ''
+ });
+ }
+
+ this.removePane();
+ } else if(o.error) {
+ this.requestInterval = false;
+ this.setProgress(100);
+ alert("There was an error uploading your image ("+o.error+").");
+ this.removePane();
+ } else if(o.noprogress) {
+ this.progressWrapper.setStyle({display : 'none'});
+ if(this.uri.indexOf('http:') == -1 || this.uri.indexOf(window.location.host) != -1) {
+ this.requestInterval = false;
+ }
+ } else {
+ this.setProgress( Math.round( (o.current/o.total) * 75) );
+ if(o.interval) {
+ this.requestInterval = o.interval;
+ }
+ }
+ }
+
+});
+
+nicUploadButton.statusCb = function(o) {
+ nicUploadButton.lastPlugin.update(o);
+}
+
+nicEditors.registerPlugin(nicPlugin,nicUploadOptions);
+
+
+
+var nicXHTML = bkClass.extend({
+ stripAttributes : ['_moz_dirty','_moz_resizing','_extended'],
+ noShort : ['style','title','script','textarea','a'],
+ cssReplace : {'font-weight:bold;' : 'strong', 'font-style:italic;' : 'em'},
+ sizes : {1 : 'xx-small', 2 : 'x-small', 3 : 'small', 4 : 'medium', 5 : 'large', 6 : 'x-large'},
+
+ construct : function(nicEditor) {
+ this.ne = nicEditor;
+ if(this.ne.options.xhtml) {
+ nicEditor.addEvent('get',this.cleanup.closure(this));
+ }
+ },
+
+ cleanup : function(ni) {
+ var node = ni.getElm();
+ var xhtml = this.toXHTML(node);
+ ni.content = xhtml;
+ },
+
+ toXHTML : function(n,r,d) {
+ var txt = '';
+ var attrTxt = '';
+ var cssTxt = '';
+ var nType = n.nodeType;
+ var nName = n.nodeName.toLowerCase();
+ var nChild = n.hasChildNodes && n.hasChildNodes();
+ var extraNodes = new Array();
+
+ switch(nType) {
+ case 1:
+ var nAttributes = n.attributes;
+
+ switch(nName) {
+ case 'b':
+ nName = 'strong';
+ break;
+ case 'i':
+ nName = 'em';
+ break;
+ case 'font':
+ nName = 'span';
+ break;
+ }
+
+ if(r) {
+ for(var i=0;i<nAttributes.length;i++) {
+ var attr = nAttributes[i];
+
+ var attributeName = attr.nodeName.toLowerCase();
+ var attributeValue = attr.nodeValue;
+
+ if(!attr.specified || !attributeValue || bkLib.inArray(this.stripAttributes,attributeName) || typeof(attributeValue) == "function") {
+ continue;
+ }
+
+ switch(attributeName) {
+ case 'style':
+ var css = attributeValue.replace(/ /g,"");
+ for(itm in this.cssReplace) {
+ if(css.indexOf(itm) != -1) {
+ extraNodes.push(this.cssReplace[itm]);
+ css = css.replace(itm,'');
+ }
+ }
+ cssTxt += css;
+ attributeValue = "";
+ break;
+ case 'class':
+ attributeValue = attributeValue.replace("Apple-style-span","");
+ break;
+ case 'size':
+ cssTxt += "font-size:"+this.sizes[attributeValue]+';';
+ attributeValue = "";
+ break;
+ }
+
+ if(attributeValue) {
+ attrTxt += ' '+attributeName+'="'+attributeValue+'"';
+ }
+ }
+
+ if(cssTxt) {
+ attrTxt += ' style="'+cssTxt+'"';
+ }
+
+ for(var i=0;i<extraNodes.length;i++) {
+ txt += '<'+extraNodes[i]+'>';
+ }
+
+ if(attrTxt == "" && nName == "span") {
+ r = false;
+ }
+ if(r) {
+ txt += '<'+nName;
+ if(nName != 'br') {
+ txt += attrTxt;
+ }
+ }
+ }
+
+
+
+ if(!nChild && !bkLib.inArray(this.noShort,attributeName)) {
+ if(r) {
+ txt += ' />';
+ }
+ } else {
+ if(r) {
+ txt += '>';
+ }
+
+ for(var i=0;i<n.childNodes.length;i++) {
+ var results = this.toXHTML(n.childNodes[i],true,true);
+ if(results) {
+ txt += results;
+ }
+ }
+ }
+
+ if(r && nChild) {
+ txt += '</'+nName+'>';
+ }
+
+ for(var i=0;i<extraNodes.length;i++) {
+ txt += '</'+extraNodes[i]+'>';
+ }
+
+ break;
+ case 3:
+ //if(n.nodeValue != '\n') {
+ txt += n.nodeValue;
+ //}
+ break;
+ }
+
+ return txt;
+ }
+});
+nicEditors.registerPlugin(nicXHTML);
+
+
+
+var nicBBCode = bkClass.extend({
+ construct : function(nicEditor) {
+ this.ne = nicEditor;
+ if(this.ne.options.bbCode) {
+ nicEditor.addEvent('get',this.bbGet.closure(this));
+ nicEditor.addEvent('set',this.bbSet.closure(this));
+
+ var loadedPlugins = this.ne.loadedPlugins;
+ for(itm in loadedPlugins) {
+ if(loadedPlugins[itm].toXHTML) {
+ this.xhtml = loadedPlugins[itm];
+ }
+ }
+ }
+ },
+
+ bbGet : function(ni) {
+ var xhtml = this.xhtml.toXHTML(ni.getElm());
+ ni.content = this.toBBCode(xhtml);
+ },
+
+ bbSet : function(ni) {
+ ni.content = this.fromBBCode(ni.content);
+ },
+
+ toBBCode : function(xhtml) {
+ function rp(r,m) {
+ xhtml = xhtml.replace(r,m);
+ }
+
+ rp(/\n/gi,"");
+ rp(/<strong>(.*?)<\/strong>/gi,"[b]$1[/b]");
+ rp(/<em>(.*?)<\/em>/gi,"[i]$1[/i]");
+ rp(/<span.*?style="text-decoration:underline;">(.*?)<\/span>/gi,"[u]$1[/u]");
+ rp(/<ul>(.*?)<\/ul>/gi,"[list]$1[/list]");
+ rp(/<li>(.*?)<\/li>/gi,"[*]$1[/*]");
+ rp(/<ol>(.*?)<\/ol>/gi,"[list=1]$1[/list]");
+ rp(/<img.*?src="(.*?)".*?>/gi,"[img]$1[/img]");
+ rp(/<a.*?href="(.*?)".*?>(.*?)<\/a>/gi,"[url=$1]$2[/url]");
+ rp(/<br.*?>/gi,"\n");
+ rp(/<.*?>.*?<\/.*?>/gi,"");
+
+ return xhtml;
+ },
+
+ fromBBCode : function(bbCode) {
+ function rp(r,m) {
+ bbCode = bbCode.replace(r,m);
+ }
+
+ rp(/\[b\](.*?)\[\/b\]/gi,"<strong>$1</strong>");
+ rp(/\[i\](.*?)\[\/i\]/gi,"<em>$1</em>");
+ rp(/\[u\](.*?)\[\/u\]/gi,"<span style=\"text-decoration:underline;\">$1</span>");
+ rp(/\[list\](.*?)\[\/list\]/gi,"<ul>$1</ul>");
+ rp(/\[list=1\](.*?)\[\/list\]/gi,"<ol>$1</ol>");
+ rp(/\[\*\](.*?)\[\/\*\]/gi,"<li>$1</li>");
+ rp(/\[img\](.*?)\[\/img\]/gi,"<img src=\"$1\" />");
+ rp(/\[url=(.*?)\](.*?)\[\/url\]/gi,"<a href=\"$1\">$2</a>");
+ rp(/\n/gi,"<br />");
+ //rp(/\[.*?\](.*?)\[\/.*?\]/gi,"$1");
+
+ return bbCode;
+ }
+
+
+});
+nicEditors.registerPlugin(nicBBCode);
+
+
+
+nicEditor = nicEditor.extend({
+ floatingPanel : function() {
+ this.floating = new bkElement('DIV').setStyle({position: 'absolute', top : '-1000px'}).appendTo(document.body);
+ this.addEvent('focus', this.reposition.closure(this)).addEvent('blur', this.hide.closure(this));
+ this.setPanel(this.floating);
+ },
+
+ reposition : function() {
+ var e = this.selectedInstance.e;
+ this.floating.setStyle({ width : (parseInt(e.getStyle('width')) || e.clientWidth)+'px' });
+ var top = e.offsetTop-this.floating.offsetHeight;
+ if(top < 0) {
+ top = e.offsetTop+e.offsetHeight;
+ }
+
+ this.floating.setStyle({ top : top+'px', left : e.offsetLeft+'px', display : 'block' });
+ },
+
+ hide : function() {
+ this.floating.setStyle({ top : '-1000px'});
+ }
+});
+
+
+
+/* START CONFIG */
+var nicCodeOptions = {
+ buttons : {
+ 'xhtml' : {name : 'Edit HTML', type : 'nicCodeButton'}
+ }
+
+};
+/* END CONFIG */
+
+var nicCodeButton = nicEditorAdvancedButton.extend({
+ width : '350px',
+
+ addPane : function() {
+ this.addForm({
+ '' : {type : 'title', txt : 'Edit HTML'},
+ 'code' : {type : 'content', 'value' : this.ne.selectedInstance.getContent(), style : {width: '340px', height : '200px'}}
+ });
+ },
+
+ submit : function(e) {
+ var code = this.inputs['code'].value;
+ this.ne.selectedInstance.setContent(code);
+ this.removePane();
+ }
+});
+
+nicEditors.registerPlugin(nicPlugin,nicCodeOptions);
+
-var nicEditorSaveButton=nicEditorButton.extend({init:function(){if(!this.ne.options.onSave){this.margin.setStyle({display:"none"})}},mouseClick:function(){var B=this.ne.options.onSave;var A=this.ne.selectedInstance;B(A.getContent(),A.elm.id,A)}});nicEditors.registerPlugin(nicPlugin,nicSaveOptions);
-
diff --git a/static/website/js/nicEditorIcons.gif b/static/website/js/nicEditorIcons.gif
index 5cf1ebe..cd33a5d 100644..100755
--- a/static/website/js/nicEditorIcons.gif
+++ b/static/website/js/nicEditorIcons.gif
Binary files differ
diff --git a/static/website/js/thread-user.js b/static/website/js/thread-user.js
index e44448a..d2c8f22 100644
--- a/static/website/js/thread-user.js
+++ b/static/website/js/thread-user.js
@@ -34,13 +34,13 @@ $(document).ready(function() {
function modify(thisObj){
thisObj.hide();
thisObj.next().css("display", "block");
-
+
$question_title.hide();
$question_title_edit_input.val($.trim($($question_title).text()));
$question_title_edit.show();
$question_edit.hide();
$question_save.show();
-
+
$questionNicPanel.show();
$questionInstance.focus();
$question_details_edit.show();
@@ -63,7 +63,7 @@ $(document).ready(function() {
$questionNicPanel.hide();
$question_details_edit.hide();
$(this).prev().css("display", "block");
-
+
/* make the ajax call */
//var id_length = $question_save.attr("id").length;
//var question_id = parseInt($question_save.attr("id").substr(id_length-1));
@@ -80,7 +80,6 @@ $(document).ready(function() {
type: "POST",
dataType: "html",
success: function(data){
- console.log(data);
$saving.hide();
$saved.show();
$saved.fadeOut("slow");
@@ -105,7 +104,7 @@ $(document).ready(function() {
var tutorial = $question_tutorial.val();
var minute_range = $question_minute_range.val();
var second_range = $question_second_range.val();
-
+
$.ajax({
url: "/ajax-details-update/",
data: {
@@ -147,58 +146,163 @@ $(document).ready(function() {
}
});
});
+
/*
- * reply edit section
+ * answer edit section
* set the dom variables
*/
- $reply_edit = $('.reply .edit');
- $reply_save = $(".reply .save");
- $replyPanelWrapper = $("#replyPanelWrapper");
+ $answer_edit = $('.answer .edit');
+ $answer_save = $(".answer .save");
+ $answerPanelWrapper = $("#answerPanelWrapper");
- var replyNicEditor = new nicEditor({
+ var answerNicEditor = new nicEditor({
buttonList : ['fontSize','bold','italic','underline','strikeThrough','subscript','superscript','html','image', 'link'],
iconsPath: "/static/website/js/nicEditorIcons.gif",
});
- replyNicEditor.panelInstance('replyNicPanel');
+ answerNicEditor.panelInstance('answerNicPanel');
- $reply_edit.click(function() {
+ $answer_edit.click(function(e) {
var target = $(this).data("target");
- console.log(target);
- replyNicEditor.addInstance(target);
- $(this).parents("div.reply").prepend($replyPanelWrapper);
- $replyPanelWrapper.show();
- $('#replyPanelWrapper .nicEdit-panelContain').parent().width('100%');
- $('#replyPanelWrapper .nicEdit-panelContain').parent().next().width('100%');
+ answerNicEditor.addInstance(target);
+ $(this).parents("div.answer").prepend($answerPanelWrapper);
+ $answerPanelWrapper.show();
+ $('#answerPanelWrapper .nicEdit-panelContain').parent().width('100%');
+ $('#answerPanelWrapper .nicEdit-panelContain').parent().next().width('100%');
$(this).hide();
$(this).next().show();
+ $("#"+target).focus();
+ e.preventDefault();
});
- $reply_save.click(function() {
+ $answer_save.click(function() {
$saving.show();
var target = $(this).data("target");
- replyNicEditor.removeInstance(target);
- $replyPanelWrapper.hide();
- $('#replyPanelWrapper .nicEdit-panelContain').parent().width('100%');
+ answerNicEditor.removeInstance(target);
+ $answerPanelWrapper.hide();
+ $('#answerPanelWrapper .nicEdit-panelContain').parent().width('100%');
$(this).hide();
$(this).prev().show();
- var reply_id = parseInt($(this).data("rid"));
- var reply_body = $("#"+target).html();
+ var answer_id = parseInt($(this).data("aid"));
+ var answer_body = $("#"+target).html();
+
+ $.ajax({
+ url: "/ajax-answer-update/",
+ type: "POST",
+ data: {
+ answer_id: answer_id,
+ answer_body: answer_body
+ },
+ success: function(data) {
+ $saving.hide();
+ $saved.show();
+ $saved.fadeOut("slow");
+ }
+ });
+ });
+
+ /*
+ * comment edit section
+ * set the dom variables
+ */
+ $comment = $(".comment");
+ $comment_edit = $(".comment .edit");
+ $comment_save = $(".comment .save");
+ $commentPanelWrapper = $("#commentPanelWrapper");
+
+ $comment.mouseover(function(){
+ $(this).find(".modify-wrapper").show();
+ });
+ $comment.mouseout(function(){
+ $(this).find(".modify-wrapper").hide();
+ });
+ var commentNicEditor = new nicEditor({
+ buttonList : ['fontSize','bold','italic','underline','strikeThrough','subscript','superscript','html','image', 'link'],
+ iconsPath: "/static/website/js/nicEditorIcons.gif",
+ });
+ commentNicEditor.panelInstance('commentNicPanel');
+
+ $comment_edit.click(function(e) {
+ var target = $(this).data("target");
+ commentNicEditor.addInstance(target);
+ $(this).parents("div.comment").prepend($commentPanelWrapper);
+ $commentPanelWrapper.show();
+ $('#commentPanelWrapper .nicEdit-panelContain').parent().width('100%');
+ $('#commentPanelWrapper .nicEdit-panelContain').parent().next().width('100%');
+ $(this).hide();
+ $(this).next().show();
+ $("#"+target).focus();
+ e.preventDefault();
+ });
+ $comment_save.click(function() {
+ $saving.show();
+ var target = $(this).data("target");
+ commentNicEditor.removeInstance(target);
+ $commentPanelWrapper.hide();
+ $('#commentPanelWrapper .nicEdit-panelContain').parent().width('100%');
+ $(this).hide();
+ $(this).prev().show();
+
+ var comment_id = parseInt($(this).data("cid"));
+ var comment_body = $("#"+target).html();
$.ajax({
- url: "/ajax-reply-update/",
+ url: "/ajax-answer-comment-update/",
type: "POST",
data: {
- reply_id: reply_id,
- reply_body: reply_body
+ comment_id: comment_id,
+ comment_body: comment_body
},
success: function(data) {
- console.log(data);
$saving.hide();
$saved.show();
$saved.fadeOut("slow");
}
});
});
-});
+
+ /*
+ * add a new comment
+ * set the dom variables
+ */
+ var nics = {};
+ $add_comment = $(".add-comment");
+ $cancel_commment = $(".cancel-comment");
+ $post_comment = $(".post-comment");
+
+ $add_comment.click(function(e) {
+ $(this).hide();
+ $(this).siblings(".cancel-comment").show();
+ $(this).siblings(".post-comment").show();
+
+ var target = $(this).data("target");
+ $("#"+target).show();
+ nics[target] = new nicEditor({
+ buttonList : ['fontSize','bold','italic','underline','strikeThrough','subscript','superscript','html','image', 'link'],
+ iconsPath: "/static/website/js/nicEditorIcons.gif",
+ }).panelInstance(target, {hasPanel : true});
+ e.preventDefault();
+ });
+
+ $cancel_commment.click(function(e) {
+ $(this).hide();
+ $(this).siblings(".post-comment").hide();
+ $(this).siblings(".add-comment").show();
+
+ var target = $(this).data("target");
+ nics[target].removeInstance(target);
+ nics[target] = null;
+ $("#"+target).hide();
+ e.preventDefault();
+ });
+ $post_comment.click(function(e) {
+ var target = $(this).data("target");
+ var answer_id = $(this).data("aid");
+ var form = $(this).data("form");
+ $form = $("#"+form);
+ nics[target].instanceById(target).saveContent();
+ $form.submit();
+ e.preventDefault;
+ });
+});
diff --git a/static/website/slick/ajax-loader.gif b/static/website/slick/ajax-loader.gif
new file mode 100644
index 0000000..e0e6e97
--- /dev/null
+++ b/static/website/slick/ajax-loader.gif
Binary files differ
diff --git a/static/website/slick/fonts/slick.eot b/static/website/slick/fonts/slick.eot
new file mode 100644
index 0000000..2cbab9c
--- /dev/null
+++ b/static/website/slick/fonts/slick.eot
Binary files differ
diff --git a/static/website/slick/fonts/slick.svg b/static/website/slick/fonts/slick.svg
new file mode 100644
index 0000000..b36a66a
--- /dev/null
+++ b/static/website/slick/fonts/slick.svg
@@ -0,0 +1,14 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg xmlns="http://www.w3.org/2000/svg">
+<metadata>Generated by Fontastic.me</metadata>
+<defs>
+<font id="slick" horiz-adv-x="512">
+<font-face font-family="slick" units-per-em="512" ascent="480" descent="-32"/>
+<missing-glyph horiz-adv-x="512" />
+
+<glyph unicode="&#8594;" d="M241 113l130 130c4 4 6 8 6 13 0 5-2 9-6 13l-130 130c-3 3-7 5-12 5-5 0-10-2-13-5l-29-30c-4-3-6-7-6-12 0-5 2-10 6-13l87-88-87-88c-4-3-6-8-6-13 0-5 2-9 6-12l29-30c3-3 8-5 13-5 5 0 9 2 12 5z m234 143c0-40-9-77-29-110-20-34-46-60-80-80-33-20-70-29-110-29-40 0-77 9-110 29-34 20-60 46-80 80-20 33-29 70-29 110 0 40 9 77 29 110 20 34 46 60 80 80 33 20 70 29 110 29 40 0 77-9 110-29 34-20 60-46 80-80 20-33 29-70 29-110z"/>
+<glyph unicode="&#8592;" d="M296 113l29 30c4 3 6 7 6 12 0 5-2 10-6 13l-87 88 87 88c4 3 6 8 6 13 0 5-2 9-6 12l-29 30c-3 3-8 5-13 5-5 0-9-2-12-5l-130-130c-4-4-6-8-6-13 0-5 2-9 6-13l130-130c3-3 7-5 12-5 5 0 10 2 13 5z m179 143c0-40-9-77-29-110-20-34-46-60-80-80-33-20-70-29-110-29-40 0-77 9-110 29-34 20-60 46-80 80-20 33-29 70-29 110 0 40 9 77 29 110 20 34 46 60 80 80 33 20 70 29 110 29 40 0 77-9 110-29 34-20 60-46 80-80 20-33 29-70 29-110z"/>
+<glyph unicode="&#8226;" d="M475 256c0-40-9-77-29-110-20-34-46-60-80-80-33-20-70-29-110-29-40 0-77 9-110 29-34 20-60 46-80 80-20 33-29 70-29 110 0 40 9 77 29 110 20 34 46 60 80 80 33 20 70 29 110 29 40 0 77-9 110-29 34-20 60-46 80-80 20-33 29-70 29-110z"/>
+<glyph unicode="&#97;" d="M475 439l0-128c0-5-1-9-5-13-4-4-8-5-13-5l-128 0c-8 0-13 3-17 11-3 7-2 14 4 20l40 39c-28 26-62 39-100 39-20 0-39-4-57-11-18-8-33-18-46-32-14-13-24-28-32-46-7-18-11-37-11-57 0-20 4-39 11-57 8-18 18-33 32-46 13-14 28-24 46-32 18-7 37-11 57-11 23 0 44 5 64 15 20 9 38 23 51 42 2 1 4 3 7 3 3 0 5-1 7-3l39-39c2-2 3-3 3-6 0-2-1-4-2-6-21-25-46-45-76-59-29-14-60-20-93-20-30 0-58 5-85 17-27 12-51 27-70 47-20 19-35 43-47 70-12 27-17 55-17 85 0 30 5 58 17 85 12 27 27 51 47 70 19 20 43 35 70 47 27 12 55 17 85 17 28 0 55-5 81-15 26-11 50-26 70-45l37 37c6 6 12 7 20 4 8-4 11-9 11-17z"/>
+</font></defs></svg>
diff --git a/static/website/slick/fonts/slick.ttf b/static/website/slick/fonts/slick.ttf
new file mode 100644
index 0000000..9d03461
--- /dev/null
+++ b/static/website/slick/fonts/slick.ttf
Binary files differ
diff --git a/static/website/slick/fonts/slick.woff b/static/website/slick/fonts/slick.woff
new file mode 100644
index 0000000..8ee9972
--- /dev/null
+++ b/static/website/slick/fonts/slick.woff
Binary files differ
diff --git a/static/website/slick/slick.css b/static/website/slick/slick.css
new file mode 100644
index 0000000..8c09f9e
--- /dev/null
+++ b/static/website/slick/slick.css
@@ -0,0 +1,47 @@
+/* Slider */
+.slick-slider { position: relative; display: block; box-sizing: border-box; -moz-box-sizing: border-box; -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; -ms-touch-action: none; touch-action: none; -webkit-tap-highlight-color: transparent; }
+
+.slick-list { position: relative; overflow: hidden; display: block; margin: 0; padding: 0; }
+.slick-list:focus { outline: none; }
+.slick-loading .slick-list { background: white url(./ajax-loader.gif) center center no-repeat; }
+.slick-list.dragging { cursor: pointer; cursor: hand; }
+
+.slick-slider .slick-list, .slick-track, .slick-slide, .slick-slide img { -webkit-transform: translate3d(0, 0, 0); -moz-transform: translate3d(0, 0, 0); -ms-transform: translate3d(0, 0, 0); -o-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); }
+
+.slick-track { position: relative; left: 0; top: 0; display: block; zoom: 1; }
+.slick-track:before, .slick-track:after { content: ""; display: table; }
+.slick-track:after { clear: both; }
+.slick-loading .slick-track { visibility: hidden; }
+
+.slick-slide { float: left; height: 100%; min-height: 1px; display: none; }
+.slick-slide img { display: block; }
+.slick-slide img.slick-loading { background: white url(./ajax-loader.gif) center center no-repeat; padding-bottom: 100%; }
+.slick-slide.dragging img { pointer-events: none; }
+.slick-initialized .slick-slide { display: block; }
+.slick-loading .slick-slide { visibility: hidden; }
+.slick-vertical .slick-slide { display: block; height: auto; border: 1px solid transparent; }
+
+/* Icons */
+@font-face { font-family: "slick"; src: url("./fonts/slick.eot"); src: url("./fonts/slick.eot?#iefix") format("embedded-opentype"), url("./fonts/slick.woff") format("woff"), url("./fonts/slick.ttf") format("truetype"), url("./fonts/slick.svg#slick") format("svg"); font-weight: normal; font-style: normal; }
+/* Arrows */
+.slick-prev, .slick-next { position: absolute; display: block; height: 20px; width: 20px; line-height: 0; font-size: 0; cursor: pointer; background: transparent; color: transparent; top: 50%; margin-top: -10px; padding: 0; border: none; outline: none; }
+.slick-prev:focus, .slick-next:focus { outline: none; }
+.slick-prev.slick-disabled:before, .slick-next.slick-disabled:before { opacity: 0.25; }
+
+.slick-prev:before, .slick-next:before { font-family: "slick"; font-size: 20px; line-height: 1; color: white; opacity: 0.85; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
+
+.slick-prev { left: -25px; }
+.slick-prev:before { content: '\2190'; }
+
+.slick-next { right: -25px; }
+.slick-next:before { content: '\2192'; }
+
+/* Dots */
+.slick-slider { margin-bottom: 30px; }
+
+.slick-dots { position: absolute; bottom: -45px; list-style: none; display: block; text-align: center; padding: 0px; width: 100%; }
+.slick-dots li { position: relative; display: inline-block; height: 20px; width: 20px; margin: 0px 5px; padding: 0px; cursor: pointer; }
+.slick-dots li button { border: 0; background: transparent; display: block; height: 20px; width: 20px; outline: none; line-height: 0; font-size: 0; color: transparent; padding: 5px; cursor: pointer; outline: none; }
+.slick-dots li button:focus { outline: none; }
+.slick-dots li button:before { position: absolute; top: 0; left: 0; content: '\2022'; width: 20px; height: 20px; font-family: "slick"; font-size: 6px; line-height: 20px; text-align: center; color: black; opacity: 0.25; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
+.slick-dots li.slick-active button:before { opacity: 0.75; } \ No newline at end of file
diff --git a/static/website/slick/slick.js b/static/website/slick/slick.js
new file mode 100644
index 0000000..ceb40f0
--- /dev/null
+++ b/static/website/slick/slick.js
@@ -0,0 +1,1668 @@
+/*
+ _ _ _ _
+ ___| (_) ___| | __ (_)___
+/ __| | |/ __| |/ / | / __|
+\__ \ | | (__| < _ | \__ \
+|___/_|_|\___|_|\_(_)/ |___/
+ |__/
+
+ Author: Ken Wheeler
+ Website: http://kenwheeler.github.io
+ Docs: http://kenwheeler.github.io/slick
+ Repo: http://github.com/kenwheeler/slick
+ Issues: http://github.com/kenwheeler/slick/issues
+
+ */
+
+/* global window, document, define, jQuery, setInterval, clearInterval */
+
+(function(factory) {
+ 'use strict';
+ if (typeof define === 'function' && define.amd) {
+ define(['jquery'], factory);
+ } else {
+ factory(jQuery);
+ }
+
+}(function($) {
+ 'use strict';
+ var Slick = window.Slick || {};
+
+ Slick = (function() {
+
+ var instanceUid = 0;
+
+ function Slick(element, settings) {
+
+ var _ = this,
+ responsiveSettings, breakpoint;
+
+ _.defaults = {
+ accessibility: true,
+ arrows: true,
+ autoplay: false,
+ autoplaySpeed: 3000,
+ centerMode: false,
+ centerPadding: '50px',
+ cssEase: 'ease',
+ customPaging: function(slider, i) {
+ return '<button type="button">' + (i + 1) + '</button>';
+ },
+ dots: false,
+ draggable: true,
+ easing: 'linear',
+ fade: false,
+ infinite: true,
+ lazyLoad: 'ondemand',
+ onBeforeChange: null,
+ onAfterChange: null,
+ onInit: null,
+ onReInit: null,
+ pauseOnHover: true,
+ responsive: null,
+ slide: 'div',
+ slidesToShow: 1,
+ slidesToScroll: 1,
+ speed: 300,
+ swipe: true,
+ touchMove: true,
+ touchThreshold: 5,
+ vertical: false
+ };
+
+ _.initials = {
+ animating: false,
+ autoPlayTimer: null,
+ currentSlide: 0,
+ currentLeft: null,
+ direction: 1,
+ $dots: null,
+ listWidth: null,
+ listHeight: null,
+ loadIndex: 0,
+ $nextArrow: null,
+ $prevArrow: null,
+ slideCount: null,
+ slideWidth: null,
+ $slideTrack: null,
+ $slides: null,
+ sliding: false,
+ slideOffset: 0,
+ swipeLeft: null,
+ $list: null,
+ touchObject: {},
+ transformsEnabled: false
+ };
+
+ $.extend(_, _.initials);
+
+ _.activeBreakpoint = null;
+ _.animType = null;
+ _.animProp = null;
+ _.breakpoints = [];
+ _.breakpointSettings = [];
+ _.cssTransitions = false;
+ _.paused = false;
+ _.positionProp = null;
+ _.$slider = $(element);
+ _.$slidesCache = null;
+ _.transformType = null;
+ _.transitionType = null;
+ _.windowWidth = 0;
+ _.windowTimer = null;
+
+ _.options = $.extend({}, _.defaults, settings);
+
+ _.originalSettings = _.options;
+ responsiveSettings = _.options.responsive || null;
+
+ if (responsiveSettings && responsiveSettings.length > -1) {
+ for (breakpoint in responsiveSettings) {
+ if (responsiveSettings.hasOwnProperty(breakpoint)) {
+ _.breakpoints.push(responsiveSettings[
+ breakpoint].breakpoint);
+ _.breakpointSettings[responsiveSettings[
+ breakpoint].breakpoint] =
+ responsiveSettings[breakpoint].settings;
+ }
+ }
+ _.breakpoints.sort(function(a, b) {
+ return b - a;
+ });
+ }
+
+ _.autoPlay = $.proxy(_.autoPlay, _);
+ _.autoPlayClear = $.proxy(_.autoPlayClear, _);
+ _.changeSlide = $.proxy(_.changeSlide, _);
+ _.setPosition = $.proxy(_.setPosition, _);
+ _.swipeHandler = $.proxy(_.swipeHandler, _);
+ _.dragHandler = $.proxy(_.dragHandler, _);
+ _.keyHandler = $.proxy(_.keyHandler, _);
+ _.autoPlayIterator = $.proxy(_.autoPlayIterator, _);
+
+ _.instanceUid = instanceUid++;
+
+ _.init();
+
+ }
+
+ return Slick;
+
+ }());
+
+ Slick.prototype.addSlide = function(markup, index, addBefore) {
+
+ var _ = this;
+
+ if (typeof(index) === 'boolean') {
+ addBefore = index;
+ index = null;
+ } else if (index < 0 || (index >= _.slideCount)) {
+ return false;
+ }
+
+ _.unload();
+
+ if (typeof(index) === 'number') {
+ if (index === 0 && _.$slides.length === 0) {
+ $(markup).appendTo(_.$slideTrack);
+ } else if (addBefore) {
+ $(markup).insertBefore(_.$slides.eq(index));
+ } else {
+ $(markup).insertAfter(_.$slides.eq(index));
+ }
+ } else {
+ if (addBefore === true) {
+ $(markup).prependTo(_.$slideTrack);
+ } else {
+ $(markup).appendTo(_.$slideTrack);
+ }
+ }
+
+ _.$slides = _.$slideTrack.children(this.options.slide);
+
+ _.$slideTrack.children(this.options.slide).remove();
+
+ _.$slideTrack.append(_.$slides);
+
+ _.$slidesCache = _.$slides;
+
+ _.reinit();
+
+ };
+
+ Slick.prototype.animateSlide = function(targetLeft,
+ callback) {
+
+ var animProps = {}, _ = this;
+
+ if (_.transformsEnabled === false) {
+ if (_.options.vertical === false) {
+ _.$slideTrack.animate({
+ left: targetLeft
+ }, _.options.speed, _.options.easing, callback);
+ } else {
+ _.$slideTrack.animate({
+ top: targetLeft
+ }, _.options.speed, _.options.easing, callback);
+ }
+
+ } else {
+
+ if (_.cssTransitions === false) {
+
+ $({
+ animStart: _.currentLeft
+ }).animate({
+ animStart: targetLeft
+ }, {
+ duration: _.options.speed,
+ easing: _.options.easing,
+ step: function(now) {
+ if (_.options.vertical === false) {
+ animProps[_.animType] = 'translate(' +
+ now + 'px, 0px)';
+ _.$slideTrack.css(animProps);
+ } else {
+ animProps[_.animType] = 'translate(0px,' +
+ now + 'px,0px)';
+ _.$slideTrack.css(animProps);
+ }
+ },
+ complete: function() {
+ if (callback) {
+ callback.call();
+ }
+ }
+ });
+
+ } else {
+
+ _.applyTransition();
+
+ if (_.options.vertical === false) {
+ animProps[_.animType] = 'translate3d(' + targetLeft + 'px, 0px, 0px)';
+ } else {
+ animProps[_.animType] = 'translate3d(0px,' + targetLeft + 'px, 0px)';
+ }
+ _.$slideTrack.css(animProps);
+
+ if (callback) {
+ setTimeout(function() {
+
+ _.disableTransition();
+
+ callback.call();
+ }, _.options.speed);
+ }
+
+ }
+
+ }
+
+ };
+
+ Slick.prototype.applyTransition = function(slide) {
+
+ var _ = this,
+ transition = {};
+
+ if (_.options.fade === false) {
+ transition[_.transitionType] = _.transformType + ' ' + _.options.speed + 'ms ' + _.options.cssEase;
+ } else {
+ transition[_.transitionType] = 'opacity ' + _.options.speed + 'ms ' + _.options.cssEase;
+ }
+
+ if (_.options.fade === false) {
+ _.$slideTrack.css(transition);
+ } else {
+ _.$slides.eq(slide).css(transition);
+ }
+
+ };
+
+ Slick.prototype.autoPlay = function() {
+
+ var _ = this;
+
+ if (_.autoPlayTimer) {
+ clearInterval(_.autoPlayTimer);
+ }
+
+ if (_.slideCount > _.options.slidesToShow && _.paused !== true) {
+ _.autoPlayTimer = setInterval(_.autoPlayIterator,
+ _.options.autoplaySpeed);
+ }
+
+ };
+
+ Slick.prototype.autoPlayClear = function() {
+
+ var _ = this;
+
+ if (_.autoPlayTimer) {
+ clearInterval(_.autoPlayTimer);
+ }
+
+ };
+
+ Slick.prototype.autoPlayIterator = function() {
+
+ var _ = this;
+
+ if (_.options.infinite === false) {
+
+ if (_.direction === 1) {
+
+ if ((_.currentSlide + 1) === _.slideCount -
+ 1) {
+ _.direction = 0;
+ }
+
+ _.slideHandler(_.currentSlide + _.options
+ .slidesToScroll);
+
+ } else {
+
+ if ((_.currentSlide - 1 === 0)) {
+
+ _.direction = 1;
+
+ }
+
+ _.slideHandler(_.currentSlide - _.options
+ .slidesToScroll);
+
+ }
+
+ } else {
+
+ _.slideHandler(_.currentSlide + _.options.slidesToScroll);
+
+ }
+
+ };
+
+ Slick.prototype.buildArrows = function() {
+
+ var _ = this;
+
+ if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {
+
+ _.$prevArrow = $(
+ '<button type="button" class="slick-prev">Previous</button>').appendTo(
+ _.$slider);
+ _.$nextArrow = $(
+ '<button type="button" class="slick-next">Next</button>').appendTo(
+ _.$slider);
+
+ if (_.options.infinite !== true) {
+ _.$prevArrow.addClass('slick-disabled');
+ }
+
+ }
+
+ };
+
+ Slick.prototype.buildDots = function() {
+
+ var _ = this,
+ i, dotString;
+
+ if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {
+
+ dotString = '<ul class="slick-dots">';
+
+ for (i = 0; i <= _.getDotCount(); i += 1) {
+ dotString += '<li>' + _.options.customPaging.call(this, _, i) + '</li>';
+ }
+
+ dotString += '</ul>';
+
+ _.$dots = $(dotString).appendTo(
+ _.$slider);
+
+ _.$dots.find('li').first().addClass(
+ 'slick-active');
+
+ }
+
+ };
+
+ Slick.prototype.buildOut = function() {
+
+ var _ = this;
+
+ _.$slides = _.$slider.children(_.options.slide +
+ ':not(.slick-cloned)').addClass(
+ 'slick-slide');
+ _.slideCount = _.$slides.length;
+ _.$slidesCache = _.$slides;
+
+ _.$slider.addClass('slick-slider');
+
+ _.$slideTrack = (_.slideCount === 0) ?
+ $('<div class="slick-track"/>').appendTo(_.$slider) :
+ _.$slides.wrapAll('<div class="slick-track"/>').parent();
+
+ _.$list = _.$slideTrack.wrap(
+ '<div class="slick-list"/>').parent();
+ _.$slideTrack.css('opacity', 0);
+
+ if (_.options.centerMode === true) {
+ _.options.infinite = true;
+ _.options.slidesToScroll = 1;
+ if (_.options.slidesToShow % 2 === 0) {
+ _.options.slidesToShow = 3;
+ }
+ }
+
+ $('img[data-lazy]', _.$slider).not('[src]').addClass('slick-loading');
+
+ _.setupInfinite();
+
+ _.buildArrows();
+
+ _.buildDots();
+
+ if (_.options.accessibility === true) {
+ _.$list.prop('tabIndex', 0);
+ }
+
+ _.setSlideClasses(0);
+
+ if (_.options.draggable === true) {
+ _.$list.addClass('draggable');
+ }
+
+ };
+
+ Slick.prototype.checkResponsive = function() {
+
+ var _ = this,
+ breakpoint, targetBreakpoint;
+
+ if (_.originalSettings.responsive && _.originalSettings
+ .responsive.length > -1 && _.originalSettings.responsive !== null) {
+
+ targetBreakpoint = null;
+
+ for (breakpoint in _.breakpoints) {
+ if (_.breakpoints.hasOwnProperty(breakpoint)) {
+ if ($(window).width() < _.breakpoints[
+ breakpoint]) {
+ targetBreakpoint = _.breakpoints[
+ breakpoint];
+ }
+ }
+ }
+
+ if (targetBreakpoint !== null) {
+ if (_.activeBreakpoint !== null) {
+ if (targetBreakpoint !== _.activeBreakpoint) {
+ _.activeBreakpoint =
+ targetBreakpoint;
+ _.options = $.extend({}, _.defaults,
+ _.breakpointSettings[
+ targetBreakpoint]);
+ _.refresh();
+ }
+ } else {
+ _.activeBreakpoint = targetBreakpoint;
+ _.options = $.extend({}, _.defaults,
+ _.breakpointSettings[
+ targetBreakpoint]);
+ _.refresh();
+ }
+ } else {
+ if (_.activeBreakpoint !== null) {
+ _.activeBreakpoint = null;
+ _.options = $.extend({}, _.defaults,
+ _.originalSettings);
+ _.refresh();
+ }
+ }
+
+ }
+
+ };
+
+ Slick.prototype.changeSlide = function(event) {
+
+ var _ = this;
+
+ switch (event.data.message) {
+
+ case 'previous':
+ _.slideHandler(_.currentSlide - _.options
+ .slidesToScroll);
+ break;
+
+ case 'next':
+ _.slideHandler(_.currentSlide + _.options
+ .slidesToScroll);
+ break;
+
+ case 'index':
+ _.slideHandler($(event.target).parent().index() * _.options.slidesToScroll);
+ break;
+
+ default:
+ return false;
+ }
+
+ };
+
+ Slick.prototype.destroy = function() {
+
+ var _ = this;
+
+ _.autoPlayClear();
+
+ _.touchObject = {};
+
+ $('.slick-cloned', _.$slider).remove();
+ if (_.$dots) {
+ _.$dots.remove();
+ }
+ if (_.$prevArrow) {
+ _.$prevArrow.remove();
+ _.$nextArrow.remove();
+ }
+ _.$slides.unwrap().unwrap();
+ _.$slides.removeClass(
+ 'slick-slide slick-active slick-visible').removeAttr('style');
+ _.$slider.removeClass('slick-slider');
+ _.$slider.removeClass('slick-initialized');
+
+ _.$list.off('.slick');
+ $(window).off('.slick-' + _.instanceUid);
+ };
+
+ Slick.prototype.disableTransition = function(slide) {
+
+ var _ = this,
+ transition = {};
+
+ transition[_.transitionType] = "";
+
+ if (_.options.fade === false) {
+ _.$slideTrack.css(transition);
+ } else {
+ _.$slides.eq(slide).css(transition);
+ }
+
+ };
+
+ Slick.prototype.fadeSlide = function(slideIndex, callback) {
+
+ var _ = this;
+
+ if (_.cssTransitions === false) {
+
+ _.$slides.eq(slideIndex).css({
+ zIndex: 1000
+ });
+
+ _.$slides.eq(slideIndex).animate({
+ opacity: 1
+ }, _.options.speed, _.options.easing, callback);
+
+ } else {
+
+ _.applyTransition(slideIndex);
+
+ _.$slides.eq(slideIndex).css({
+ opacity: 1,
+ zIndex: 1000
+ });
+
+ if (callback) {
+ setTimeout(function() {
+
+ _.disableTransition(slideIndex);
+
+ callback.call();
+ }, _.options.speed);
+ }
+
+ }
+
+ };
+
+ Slick.prototype.filterSlides = function(filter) {
+
+ var _ = this;
+
+ if (filter !== null) {
+
+ _.unload();
+
+ _.$slideTrack.children(this.options.slide).remove();
+
+ _.$slidesCache.filter(filter).appendTo(_.$slideTrack);
+
+ _.reinit();
+
+ }
+
+ };
+
+ Slick.prototype.getDotCount = function() {
+
+ var _ = this,
+ breaker = 0,
+ dotCounter = 0,
+ dotCount = 0,
+ dotLimit;
+
+ dotLimit = _.options.infinite === true ? _.slideCount + _.options.slidesToShow - _.options.slidesToScroll : _.slideCount;
+
+ while (breaker < dotLimit) {
+ dotCount++;
+ dotCounter += _.options.slidesToScroll;
+ breaker = dotCounter + _.options.slidesToShow;
+ }
+
+ return dotCount;
+
+ };
+
+ Slick.prototype.getLeft = function(slideIndex) {
+
+ var _ = this,
+ targetLeft;
+
+ _.slideOffset = 0;
+
+ if (_.options.infinite === true) {
+ if (_.slideCount > _.options.slidesToShow) {
+ _.slideOffset = (_.slideWidth * _.options.slidesToShow) * -1;
+ }
+ if (_.slideCount % _.options.slidesToScroll !== 0) {
+ if (slideIndex + _.options.slidesToScroll > _.slideCount && _.slideCount > _.options.slidesToShow) {
+ _.slideOffset = ((_.slideCount % _.options.slidesToShow) * _.slideWidth) * -1;
+ }
+ }
+ } else {
+ if (_.slideCount % _.options.slidesToShow !== 0) {
+ if (slideIndex + _.options.slidesToScroll > _.slideCount && _.slideCount > _.options.slidesToShow) {
+ _.slideOffset = ((_.slideCount % _.options.slidesToShow) * _.slideWidth);
+ }
+ }
+ }
+
+ if (_.options.centerMode === true) {
+ _.slideOffset += _.slideWidth * Math.floor(_.options.slidesToShow / 2) - _.slideWidth;
+ }
+
+ if (_.options.vertical === false) {
+ targetLeft = ((slideIndex * _.slideWidth) * -1) + _.slideOffset;
+ } else {
+ _.listHeight = _.$list.height();
+ if (_.options.infinite === true) {
+ targetLeft = ((slideIndex * _.listHeight) * -1) - _.listHeight;
+ } else {
+ targetLeft = ((slideIndex * _.listHeight) * -1);
+ }
+ }
+
+ return targetLeft;
+
+ };
+
+ Slick.prototype.init = function() {
+
+ var _ = this;
+
+ if (!$(_.$slider).hasClass('slick-initialized')) {
+
+ $(_.$slider).addClass('slick-initialized');
+ _.buildOut();
+ _.setProps();
+ _.startLoad();
+ _.loadSlider();
+ _.initializeEvents();
+ _.checkResponsive();
+ }
+
+ if (_.options.onInit !== null) {
+ _.options.onInit.call(this, _);
+ }
+
+ };
+
+ Slick.prototype.initArrowEvents = function() {
+
+ var _ = this;
+
+ if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {
+ _.$prevArrow.on('click.slick', {
+ message: 'previous'
+ }, _.changeSlide);
+ _.$nextArrow.on('click.slick', {
+ message: 'next'
+ }, _.changeSlide);
+ }
+
+ };
+
+ Slick.prototype.initDotEvents = function() {
+
+ var _ = this;
+
+ if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {
+ $('li', _.$dots).on('click.slick', {
+ message: 'index'
+ }, _.changeSlide);
+ }
+
+ };
+
+ Slick.prototype.initializeEvents = function() {
+
+ var _ = this;
+
+ _.initArrowEvents();
+
+ _.initDotEvents();
+
+ _.$list.on('touchstart.slick mousedown.slick', {
+ action: 'start'
+ }, _.swipeHandler);
+ _.$list.on('touchmove.slick mousemove.slick', {
+ action: 'move'
+ }, _.swipeHandler);
+ _.$list.on('touchend.slick mouseup.slick', {
+ action: 'end'
+ }, _.swipeHandler);
+ _.$list.on('touchcancel.slick mouseleave.slick', {
+ action: 'end'
+ }, _.swipeHandler);
+
+ if (_.options.pauseOnHover === true && _.options.autoplay === true) {
+ _.$list.on('mouseenter.slick', _.autoPlayClear);
+ _.$list.on('mouseleave.slick', _.autoPlay);
+ }
+
+ _.$list.on('keydown.slick', _.keyHandler);
+
+ $(window).on('orientationchange.slick.slick-' + _.instanceUid, function() {
+ _.checkResponsive();
+ _.setPosition();
+ });
+
+ $(window).on('resize.slick.slick-' + _.instanceUid, function() {
+ if ($(window).width !== _.windowWidth) {
+ clearTimeout(_.windowDelay);
+ _.windowDelay = window.setTimeout(function() {
+ _.windowWidth = $(window).width();
+ _.checkResponsive();
+ _.setPosition();
+ }, 50);
+ }
+ });
+
+ $(window).on('load.slick.slick-' + _.instanceUid, _.setPosition);
+
+ };
+
+ Slick.prototype.initUI = function() {
+
+ var _ = this;
+
+ if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {
+
+ _.$prevArrow.show();
+ _.$nextArrow.show();
+
+ }
+
+ if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {
+
+ _.$dots.show();
+
+ }
+
+ if (_.options.autoplay === true) {
+
+ _.autoPlay();
+
+ }
+
+ };
+
+ Slick.prototype.keyHandler = function(event) {
+
+ var _ = this;
+
+ if (event.keyCode === 37) {
+ _.changeSlide({
+ data: {
+ message: 'previous'
+ }
+ });
+ } else if (event.keyCode === 39) {
+ _.changeSlide({
+ data: {
+ message: 'next'
+ }
+ });
+ }
+
+ };
+
+ Slick.prototype.lazyLoad = function() {
+
+ var _ = this,
+ loadRange, cloneRange, rangeStart, rangeEnd;
+
+ if (_.options.centerMode === true) {
+ rangeStart = _.options.slidesToShow + _.currentSlide - 1;
+ rangeEnd = rangeStart + _.options.slidesToShow + 2;
+ } else {
+ rangeStart = _.options.infinite ? _.options.slidesToShow + _.currentSlide : _.currentSlide;
+ rangeEnd = rangeStart + _.options.slidesToShow;
+ }
+
+ loadRange = _.$slider.find('.slick-slide').slice(rangeStart, rangeEnd);
+
+ $('img[data-lazy]', loadRange).not('[src]').each(function() {
+ $(this).attr('src', $(this).attr('data-lazy')).removeClass('slick-loading');
+ });
+
+ if (_.currentSlide >= _.slideCount - _.options.slidesToShow) {
+ cloneRange = _.$slider.find('.slick-cloned').slice(0, _.options.slidesToShow);
+ $('img[data-lazy]', cloneRange).not('[src]').each(function() {
+ $(this).attr('src', $(this).attr('data-lazy')).removeClass('slick-loading');
+ });
+ } else if (_.currentSlide === 0) {
+ cloneRange = _.$slider.find('.slick-cloned').slice(_.options.slidesToShow * -1);
+ $('img[data-lazy]', cloneRange).not('[src]').each(function() {
+ $(this).attr('src', $(this).attr('data-lazy')).removeClass('slick-loading');
+ });
+ }
+
+ };
+
+ Slick.prototype.loadSlider = function() {
+
+ var _ = this;
+
+ _.setPosition();
+
+ _.$slideTrack.css({
+ opacity: 1
+ });
+
+ _.$slider.removeClass('slick-loading');
+
+ _.initUI();
+
+ if (_.options.lazyLoad === 'progressive') {
+ _.progressiveLazyLoad();
+ }
+
+ };
+
+ Slick.prototype.postSlide = function(index) {
+
+ var _ = this;
+
+ if (_.options.onAfterChange !== null && index !== _.currentSlide) {
+ _.options.onAfterChange.call(this, _, index);
+ }
+
+ _.animating = false;
+
+ _.setPosition();
+
+ _.swipeLeft = null;
+
+ if (_.options.autoplay === true && _.paused === false) {
+ _.autoPlay();
+ }
+
+ _.setSlideClasses(_.currentSlide);
+
+ };
+
+ Slick.prototype.progressiveLazyLoad = function() {
+
+ var _ = this,
+ imgCount, targetImage;
+
+ imgCount = $('img[data-lazy]').not('[src]').length;
+
+ if (imgCount > 0) {
+ targetImage = $($('img[data-lazy]', _.$slider).not('[src]').get(0));
+ targetImage.attr('src', targetImage.attr('data-lazy')).removeClass('slick-loading').load(function() {
+ _.progressiveLazyLoad();
+ });
+ }
+
+ };
+
+ Slick.prototype.refresh = function() {
+
+ var _ = this;
+
+ _.destroy();
+
+ $.extend(_, _.initials);
+
+ _.init();
+
+ };
+
+ Slick.prototype.reinit = function() {
+
+ var _ = this;
+
+ _.$slides = $(_.options.slide +
+ ':not(.slick-cloned)', _.$slideTrack).addClass(
+ 'slick-slide');
+
+ _.slideCount = _.$slides.length;
+
+ if (_.currentSlide >= _.slideCount && _.currentSlide !== 0) {
+ _.currentSlide = _.currentSlide - _.options.slidesToScroll;
+ }
+
+ _.setProps();
+
+ _.setupInfinite();
+
+ _.buildArrows();
+
+ _.updateArrows();
+
+ _.initArrowEvents();
+
+ _.buildDots();
+
+ _.updateDots();
+
+ _.initDotEvents();
+
+ _.setSlideClasses(0);
+
+ _.setPosition();
+
+ if (_.options.onReInit !== null) {
+ _.options.onReInit.call(this, _);
+ }
+
+ };
+
+ Slick.prototype.removeSlide = function(index, removeBefore) {
+
+ var _ = this;
+
+ if (typeof(index) === 'boolean') {
+ removeBefore = index;
+ index = removeBefore === true ? 0 : _.slideCount - 1;
+ } else {
+ index = removeBefore === true ? --index : index;
+ }
+
+ if (_.slideCount < 1 || index < 0 || index > _.slideCount - 1) {
+ return false;
+ }
+
+ _.unload();
+
+ _.$slideTrack.children(this.options.slide).eq(index).remove();
+
+ _.$slides = _.$slideTrack.children(this.options.slide);
+
+ _.$slideTrack.children(this.options.slide).remove();
+
+ _.$slideTrack.append(_.$slides);
+
+ _.$slidesCache = _.$slides;
+
+ _.reinit();
+
+ };
+
+ Slick.prototype.setCSS = function(position) {
+
+ var _ = this,
+ positionProps = {}, x, y;
+
+ x = _.positionProp == 'left' ? position + 'px' : '0px';
+ y = _.positionProp == 'top' ? position + 'px' : '0px';
+
+ positionProps[_.positionProp] = position;
+
+ if (_.transformsEnabled === false) {
+ _.$slideTrack.css(positionProps);
+ } else {
+ positionProps = {};
+ if (_.cssTransitions === false) {
+ positionProps[_.animType] = 'translate(' + x + ', ' + y + ')';
+ _.$slideTrack.css(positionProps);
+ } else {
+ positionProps[_.animType] = 'translate3d(' + x + ', ' + y + ', 0px)';
+ _.$slideTrack.css(positionProps);
+ }
+ }
+
+ };
+
+ Slick.prototype.setDimensions = function() {
+
+ var _ = this;
+
+ if (_.options.centerMode === true) {
+ _.$list.find('.slick-slide').width(_.slideWidth);
+ } else {
+ _.$list.find('.slick-slide').width(_.slideWidth);
+ }
+
+
+ if (_.options.vertical === false) {
+ _.$slideTrack.width(Math.ceil((_.slideWidth * _
+ .$slider.find('.slick-slide').length)));
+ if (_.options.centerMode === true) {
+ _.$list.css({
+ padding: ('0px ' + _.options.centerPadding)
+ });
+ }
+ } else {
+ _.$list.height(_.$slides.first().outerHeight());
+ _.$slideTrack.height(Math.ceil((_.listHeight * _
+ .$slider.find('.slick-slide').length)));
+ if (_.options.centerMode === true) {
+ _.$list.css({
+ padding: (_.options.centerPadding + ' 0px')
+ });
+ }
+ }
+
+ };
+
+ Slick.prototype.setFade = function() {
+
+ var _ = this,
+ targetLeft;
+
+ _.$slides.each(function(index, element) {
+ targetLeft = (_.slideWidth * index) * -1;
+ $(element).css({
+ position: 'relative',
+ left: targetLeft,
+ top: 0,
+ zIndex: 800,
+ opacity: 0
+ });
+ });
+
+ _.$slides.eq(_.currentSlide).css({
+ zIndex: 900,
+ opacity: 1
+ });
+
+ };
+
+ Slick.prototype.setPosition = function() {
+
+ var _ = this;
+
+ _.setValues();
+ _.setDimensions();
+
+ if (_.options.fade === false) {
+ _.setCSS(_.getLeft(_.currentSlide));
+ } else {
+ _.setFade();
+ }
+
+ };
+
+ Slick.prototype.setProps = function() {
+
+ var _ = this;
+
+ _.positionProp = _.options.vertical === true ? 'top' : 'left';
+
+ if (_.positionProp === 'top') {
+ _.$slider.addClass('slick-vertical');
+ } else {
+ _.$slider.removeClass('slick-vertical');
+ }
+
+ if (document.body.style.WebkitTransition !== undefined ||
+ document.body.style.MozTransition !== undefined ||
+ document.body.style.msTransition !== undefined) {
+ _.cssTransitions = true;
+ }
+
+ if (document.body.style.MozTransform !== undefined) {
+ _.animType = 'MozTransform';
+ _.transformType = "-moz-transform";
+ _.transitionType = 'MozTransition';
+ }
+ if (document.body.style.webkitTransform !== undefined) {
+ _.animType = 'webkitTransform';
+ _.transformType = "-webkit-transform";
+ _.transitionType = 'webkitTransition';
+ }
+ if (document.body.style.msTransform !== undefined) {
+ _.animType = 'transform';
+ _.transformType = "transform";
+ _.transitionType = 'transition';
+ }
+
+ _.transformsEnabled = (_.animType !== null);
+
+ };
+
+ Slick.prototype.setValues = function() {
+
+ var _ = this;
+
+ _.listWidth = _.$list.width();
+ _.listHeight = _.$list.height();
+ _.slideWidth = Math.ceil(_.listWidth / _.options
+ .slidesToShow);
+
+ };
+
+ Slick.prototype.setSlideClasses = function(index) {
+
+ var _ = this,
+ centerOffset, allSlides, indexOffset;
+
+ _.$slider.find('.slick-slide').removeClass('slick-active').removeClass('slick-center');
+ allSlides = _.$slider.find('.slick-slide');
+
+ if (_.options.centerMode === true) {
+
+ centerOffset = Math.floor(_.options.slidesToShow / 2);
+
+ if (index >= centerOffset && index <= (_.slideCount - 1) - centerOffset) {
+ _.$slides.slice(index - centerOffset, index + centerOffset + 1).addClass('slick-active');
+ } else {
+ indexOffset = _.options.slidesToShow + index;
+ allSlides.slice(indexOffset - centerOffset + 1, indexOffset + centerOffset + 2).addClass('slick-active');
+ }
+
+ if (index === 0) {
+ allSlides.eq(allSlides.length - 1 - _.options.slidesToShow).addClass('slick-center');
+ } else if (index === _.slideCount - 1) {
+ allSlides.eq(_.options.slidesToShow).addClass('slick-center');
+ }
+
+ _.$slides.eq(index).addClass('slick-center');
+
+ } else {
+
+ if (index > 0 && index < (_.slideCount - _.options.slidesToShow)) {
+ _.$slides.slice(index, index + _.options.slidesToShow).addClass('slick-active');
+ } else {
+ indexOffset = _.options.slidesToShow + index;
+ allSlides.slice(indexOffset, indexOffset + _.options.slidesToShow).addClass('slick-active');
+ }
+
+ }
+
+ if (_.options.lazyLoad === 'ondemand') {
+ _.lazyLoad();
+ }
+
+ };
+
+ Slick.prototype.setupInfinite = function() {
+
+ var _ = this,
+ i, slideIndex, infiniteCount;
+
+ if (_.options.fade === true || _.options.vertical === true) {
+ _.options.slidesToShow = 1;
+ _.options.slidesToScroll = 1;
+ _.options.centerMode = false;
+ }
+
+ if (_.options.infinite === true && _.options.fade === false) {
+
+ slideIndex = null;
+
+ if (_.slideCount > _.options.slidesToShow) {
+
+ if (_.options.centerMode === true) {
+ infiniteCount = _.options.slidesToShow + 1;
+ } else {
+ infiniteCount = _.options.slidesToShow;
+ }
+
+ for (i = _.slideCount; i > (_.slideCount -
+ infiniteCount); i -= 1) {
+ slideIndex = i - 1;
+ $(_.$slides[slideIndex]).clone().attr('id', '').prependTo(
+ _.$slideTrack).addClass('slick-cloned');
+ }
+ for (i = 0; i < infiniteCount; i += 1) {
+ slideIndex = i;
+ $(_.$slides[slideIndex]).clone().attr('id', '').appendTo(
+ _.$slideTrack).addClass('slick-cloned');
+ }
+ _.$slideTrack.find('.slick-cloned').find('[id]').each(function() {
+ $(this).attr('id', '');
+ });
+
+ }
+
+ }
+
+ };
+
+ Slick.prototype.slideHandler = function(index) {
+
+ var targetSlide, animSlide, slideLeft, unevenOffset, targetLeft = null,
+ _ = this;
+
+ if (_.animating === true) {
+ return false;
+ }
+
+ targetSlide = index;
+ targetLeft = _.getLeft(targetSlide);
+ slideLeft = _.getLeft(_.currentSlide);
+
+ unevenOffset = _.slideCount % _.options.slidesToScroll !== 0 ? _.options.slidesToScroll : 0;
+
+ if (_.options.infinite === false && (index < 0 || index > (_.slideCount - _.options.slidesToShow + unevenOffset))) {
+ targetSlide = _.currentSlide;
+ _.animateSlide(slideLeft, function() {
+ _.postSlide(targetSlide);
+ });
+ return false;
+ }
+
+ if (_.options.autoplay === true) {
+ clearInterval(_.autoPlayTimer);
+ }
+
+ _.currentLeft = _.swipeLeft === null ? slideLeft : _.swipeLeft;
+
+ if (targetSlide < 0) {
+ if (_.slideCount % _.options.slidesToScroll !== 0) {
+ animSlide = _.slideCount - (_.slideCount % _.options.slidesToScroll);
+ } else {
+ animSlide = _.slideCount - _.options.slidesToScroll;
+ }
+ } else if (targetSlide > (_.slideCount - 1)) {
+ animSlide = 0;
+ } else {
+ animSlide = targetSlide;
+ }
+
+ _.animating = true;
+
+ if (_.options.onBeforeChange !== null && index !== _.currentSlide) {
+ _.options.onBeforeChange.call(this, _, _.currentSlide);
+ }
+
+ _.currentSlide = animSlide;
+ _.updateDots();
+ _.updateArrows();
+
+ if (_.options.fade === true) {
+ _.fadeSlide(animSlide, function() {
+ _.postSlide(animSlide);
+ });
+ return false;
+ }
+
+ _.animateSlide(targetLeft, function() {
+ _.postSlide(animSlide);
+ });
+
+ };
+
+ Slick.prototype.startLoad = function() {
+
+ var _ = this;
+
+ if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {
+
+ _.$prevArrow.hide();
+ _.$nextArrow.hide();
+
+ }
+
+ if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {
+
+ _.$dots.hide();
+
+ }
+
+ _.$slider.addClass('slick-loading');
+
+ };
+
+ Slick.prototype.swipeDirection = function() {
+
+ var xDist, yDist, r, swipeAngle, _ = this;
+
+ xDist = _.touchObject.startX - _.touchObject.curX;
+ yDist = _.touchObject.startY - _.touchObject.curY;
+ r = Math.atan2(yDist, xDist);
+
+ swipeAngle = Math.round(r * 180 / Math.PI);
+ if (swipeAngle < 0) {
+ swipeAngle = 360 - Math.abs(swipeAngle);
+ }
+
+ if ((swipeAngle <= 45) && (swipeAngle >= 0)) {
+ return 'left';
+ }
+ if ((swipeAngle <= 360) && (swipeAngle >= 315)) {
+ return 'left';
+ }
+ if ((swipeAngle >= 135) && (swipeAngle <= 225)) {
+ return 'right';
+ }
+
+ return 'vertical';
+
+ };
+
+ Slick.prototype.swipeEnd = function(event) {
+
+ var _ = this;
+
+ _.$list.removeClass('dragging');
+
+ if (_.touchObject.curX === undefined) {
+ return false;
+ }
+
+ if (_.touchObject.swipeLength >= _.touchObject.minSwipe) {
+ $(event.target).on('click.slick', function(event) {
+ event.stopImmediatePropagation();
+ event.stopPropagation();
+ event.preventDefault();
+ $(event.target).off('click.slick');
+ });
+
+ switch (_.swipeDirection()) {
+ case 'left':
+ _.slideHandler(_.currentSlide + _.options.slidesToScroll);
+ _.touchObject = {};
+ break;
+
+ case 'right':
+ _.slideHandler(_.currentSlide - _.options.slidesToScroll);
+ _.touchObject = {};
+ break;
+ }
+ } else {
+ if(_.touchObject.startX !== _.touchObject.curX) {
+ _.slideHandler(_.currentSlide);
+ _.touchObject = {};
+ }
+ }
+
+ };
+
+ Slick.prototype.swipeHandler = function(event) {
+
+ var _ = this;
+
+ if ('ontouchend' in document && _.options.swipe === false) {
+ return false;
+ } else if (_.options.draggable === false && !event.originalEvent.touches) {
+ return false;
+ }
+
+ _.touchObject.fingerCount = event.originalEvent && event.originalEvent.touches !== undefined ?
+ event.originalEvent.touches.length : 1;
+
+ _.touchObject.minSwipe = _.listWidth / _.options
+ .touchThreshold;
+
+ switch (event.data.action) {
+
+ case 'start':
+ _.swipeStart(event);
+ break;
+
+ case 'move':
+ _.swipeMove(event);
+ break;
+
+ case 'end':
+ _.swipeEnd(event);
+ break;
+
+ }
+
+ };
+
+ Slick.prototype.swipeMove = function(event) {
+
+ var _ = this,
+ curLeft, swipeDirection, positionOffset, touches;
+
+ touches = event.originalEvent !== undefined ? event.originalEvent.touches : null;
+
+ curLeft = _.getLeft(_.currentSlide);
+
+ if (!_.$list.hasClass('dragging') || touches && touches.length !== 1) {
+ return false;
+ }
+
+ _.touchObject.curX = touches !== undefined ? touches[0].pageX : event.clientX;
+ _.touchObject.curY = touches !== undefined ? touches[0].pageY : event.clientY;
+
+ _.touchObject.swipeLength = Math.round(Math.sqrt(
+ Math.pow(_.touchObject.curX - _.touchObject.startX, 2)));
+
+ swipeDirection = _.swipeDirection();
+
+ if (swipeDirection === 'vertical') {
+ return false;
+ }
+
+ if (event.originalEvent !== undefined) {
+ event.preventDefault();
+ }
+
+ positionOffset = _.touchObject.curX > _.touchObject.startX ? 1 : -1;
+
+ if (_.options.vertical === false) {
+ _.swipeLeft = curLeft + _.touchObject.swipeLength * positionOffset;
+ } else {
+ _.swipeLeft = curLeft + (_.touchObject
+ .swipeLength * (_.listHeight / _.listWidth)) * positionOffset;
+ }
+
+ if (_.options.fade === true || _.options.touchMove === false) {
+ return false;
+ }
+
+ if (_.animating === true) {
+ _.swipeLeft = null;
+ return false;
+ }
+
+ _.setCSS(_.swipeLeft);
+
+ };
+
+ Slick.prototype.swipeStart = function(event) {
+
+ var _ = this,
+ touches;
+
+ if (_.touchObject.fingerCount !== 1 || _.slideCount <= _.options.slidesToShow) {
+ _.touchObject = {};
+ return false;
+ }
+
+ if (event.originalEvent !== undefined && event.originalEvent.touches !== undefined) {
+ touches = event.originalEvent.touches[0];
+ }
+
+ _.touchObject.startX = _.touchObject.curX = touches !== undefined ? touches.pageX : event.clientX;
+ _.touchObject.startY = _.touchObject.curY = touches !== undefined ? touches.pageY : event.clientY;
+
+ _.$list.addClass('dragging');
+
+ };
+
+ Slick.prototype.unfilterSlides = function() {
+
+ var _ = this;
+
+ if (_.$slidesCache !== null) {
+
+ _.unload();
+
+ _.$slideTrack.children(this.options.slide).remove();
+
+ _.$slidesCache.appendTo(_.$slideTrack);
+
+ _.reinit();
+
+ }
+
+ };
+
+ Slick.prototype.unload = function() {
+
+ var _ = this;
+
+ $('.slick-cloned', _.$slider).remove();
+ if (_.$dots) {
+ _.$dots.remove();
+ }
+ if (_.$prevArrow) {
+ _.$prevArrow.remove();
+ _.$nextArrow.remove();
+ }
+ _.$slides.removeClass(
+ 'slick-slide slick-active slick-visible').removeAttr('style');
+
+ };
+
+ Slick.prototype.updateArrows = function() {
+
+ var _ = this;
+
+ if (_.options.arrows === true && _.options.infinite !==
+ true && _.slideCount > _.options.slidesToShow) {
+ _.$prevArrow.removeClass('slick-disabled');
+ _.$nextArrow.removeClass('slick-disabled');
+ if (_.currentSlide === 0) {
+ _.$prevArrow.addClass('slick-disabled');
+ _.$nextArrow.removeClass('slick-disabled');
+ } else if (_.currentSlide >= _.slideCount - _.options.slidesToShow) {
+ _.$nextArrow.addClass('slick-disabled');
+ _.$prevArrow.removeClass('slick-disabled');
+ }
+ }
+
+ };
+
+ Slick.prototype.updateDots = function() {
+
+ var _ = this;
+
+ if (_.$dots !== null) {
+
+ _.$dots.find('li').removeClass('slick-active');
+ _.$dots.find('li').eq(_.currentSlide / _.options.slidesToScroll).addClass(
+ 'slick-active');
+
+ }
+
+ };
+
+ $.fn.slick = function(options) {
+ var _ = this;
+ return _.each(function(index, element) {
+
+ element.slick = new Slick(element, options);
+
+ });
+ };
+
+ $.fn.slickAdd = function(slide, slideIndex, addBefore) {
+ var _ = this;
+ return _.each(function(index, element) {
+
+ element.slick.addSlide(slide, slideIndex, addBefore);
+
+ });
+ };
+
+ $.fn.slickFilter = function(filter) {
+ var _ = this;
+ return _.each(function(index, element) {
+
+ element.slick.filterSlides(filter);
+
+ });
+ };
+
+ $.fn.slickGoTo = function(slide) {
+ var _ = this;
+ return _.each(function(index, element) {
+
+ element.slick.slideHandler(slide);
+
+ });
+ };
+
+ $.fn.slickNext = function() {
+ var _ = this;
+ return _.each(function(index, element) {
+
+ element.slick.changeSlide({
+ data: {
+ message: 'next'
+ }
+ });
+
+ });
+ };
+
+ $.fn.slickPause = function() {
+ var _ = this;
+ return _.each(function(index, element) {
+
+ element.slick.autoPlayClear();
+ element.slick.paused = true;
+
+ });
+ };
+
+ $.fn.slickPlay = function() {
+ var _ = this;
+ return _.each(function(index, element) {
+
+ element.slick.paused = false;
+ element.slick.autoPlay();
+
+ });
+ };
+
+ $.fn.slickPrev = function() {
+ var _ = this;
+ return _.each(function(index, element) {
+
+ element.slick.changeSlide({
+ data: {
+ message: 'previous'
+ }
+ });
+
+ });
+ };
+
+ $.fn.slickRemove = function(slideIndex, removeBefore) {
+ var _ = this;
+ return _.each(function(index, element) {
+
+ element.slick.removeSlide(slideIndex, removeBefore);
+
+ });
+ };
+
+ $.fn.slickSetOption = function(option, value, refresh) {
+ var _ = this;
+ return _.each(function(index, element) {
+
+ element.slick.options[option] = value;
+
+ if (refresh === true) {
+ element.slick.unload();
+ element.slick.reinit();
+ }
+
+ });
+ };
+
+ $.fn.slickUnfilter = function() {
+ var _ = this;
+ return _.each(function(index, element) {
+
+ element.slick.unfilterSlides();
+
+ });
+ };
+
+ $.fn.unslick = function() {
+ var _ = this;
+ return _.each(function(index, element) {
+
+ element.slick.destroy();
+
+ });
+ };
+
+})); \ No newline at end of file
diff --git a/static/website/slick/slick.min.js b/static/website/slick/slick.min.js
new file mode 100644
index 0000000..f9b13f4
--- /dev/null
+++ b/static/website/slick/slick.min.js
@@ -0,0 +1 @@
+!function(a){"use strict";"function"==typeof define&&define.amd?define(["jquery"],a):a(jQuery)}(function(a){"use strict";var b=window.Slick||{};b=function(){function c(c,d){var f,g,e=this;if(e.defaults={accessibility:!0,arrows:!0,autoplay:!1,autoplaySpeed:3e3,centerMode:!1,centerPadding:"50px",cssEase:"ease",customPaging:function(a,b){return'<button type="button">'+(b+1)+"</button>"},dots:!1,draggable:!0,easing:"linear",fade:!1,infinite:!0,lazyLoad:"ondemand",onBeforeChange:null,onAfterChange:null,onInit:null,onReInit:null,pauseOnHover:!0,responsive:null,slide:"div",slidesToShow:1,slidesToScroll:1,speed:300,swipe:!0,touchMove:!0,touchThreshold:5,vertical:!1},e.initials={animating:!1,autoPlayTimer:null,currentSlide:0,currentLeft:null,direction:1,$dots:null,listWidth:null,listHeight:null,loadIndex:0,$nextArrow:null,$prevArrow:null,slideCount:null,slideWidth:null,$slideTrack:null,$slides:null,sliding:!1,slideOffset:0,swipeLeft:null,$list:null,touchObject:{},transformsEnabled:!1},a.extend(e,e.initials),e.activeBreakpoint=null,e.animType=null,e.animProp=null,e.breakpoints=[],e.breakpointSettings=[],e.cssTransitions=!1,e.paused=!1,e.positionProp=null,e.$slider=a(c),e.$slidesCache=null,e.transformType=null,e.transitionType=null,e.windowWidth=0,e.windowTimer=null,e.options=a.extend({},e.defaults,d),e.originalSettings=e.options,f=e.options.responsive||null,f&&f.length>-1){for(g in f)f.hasOwnProperty(g)&&(e.breakpoints.push(f[g].breakpoint),e.breakpointSettings[f[g].breakpoint]=f[g].settings);e.breakpoints.sort(function(a,b){return b-a})}e.autoPlay=a.proxy(e.autoPlay,e),e.autoPlayClear=a.proxy(e.autoPlayClear,e),e.changeSlide=a.proxy(e.changeSlide,e),e.setPosition=a.proxy(e.setPosition,e),e.swipeHandler=a.proxy(e.swipeHandler,e),e.dragHandler=a.proxy(e.dragHandler,e),e.keyHandler=a.proxy(e.keyHandler,e),e.autoPlayIterator=a.proxy(e.autoPlayIterator,e),e.instanceUid=b++,e.init()}var b=0;return c}(),b.prototype.addSlide=function(b,c,d){var e=this;if("boolean"==typeof c)d=c,c=null;else if(0>c||c>=e.slideCount)return!1;e.unload(),"number"==typeof c?0===c&&0===e.$slides.length?a(b).appendTo(e.$slideTrack):d?a(b).insertBefore(e.$slides.eq(c)):a(b).insertAfter(e.$slides.eq(c)):d===!0?a(b).prependTo(e.$slideTrack):a(b).appendTo(e.$slideTrack),e.$slides=e.$slideTrack.children(this.options.slide),e.$slideTrack.children(this.options.slide).remove(),e.$slideTrack.append(e.$slides),e.$slidesCache=e.$slides,e.reinit()},b.prototype.animateSlide=function(b,c){var d={},e=this;e.transformsEnabled===!1?e.options.vertical===!1?e.$slideTrack.animate({left:b},e.options.speed,e.options.easing,c):e.$slideTrack.animate({top:b},e.options.speed,e.options.easing,c):e.cssTransitions===!1?a({animStart:e.currentLeft}).animate({animStart:b},{duration:e.options.speed,easing:e.options.easing,step:function(a){e.options.vertical===!1?(d[e.animType]="translate("+a+"px, 0px)",e.$slideTrack.css(d)):(d[e.animType]="translate(0px,"+a+"px,0px)",e.$slideTrack.css(d))},complete:function(){c&&c.call()}}):(e.applyTransition(),d[e.animType]=e.options.vertical===!1?"translate3d("+b+"px, 0px, 0px)":"translate3d(0px,"+b+"px, 0px)",e.$slideTrack.css(d),c&&setTimeout(function(){e.disableTransition(),c.call()},e.options.speed))},b.prototype.applyTransition=function(a){var b=this,c={};c[b.transitionType]=b.options.fade===!1?b.transformType+" "+b.options.speed+"ms "+b.options.cssEase:"opacity "+b.options.speed+"ms "+b.options.cssEase,b.options.fade===!1?b.$slideTrack.css(c):b.$slides.eq(a).css(c)},b.prototype.autoPlay=function(){var a=this;a.autoPlayTimer&&clearInterval(a.autoPlayTimer),a.slideCount>a.options.slidesToShow&&a.paused!==!0&&(a.autoPlayTimer=setInterval(a.autoPlayIterator,a.options.autoplaySpeed))},b.prototype.autoPlayClear=function(){var a=this;a.autoPlayTimer&&clearInterval(a.autoPlayTimer)},b.prototype.autoPlayIterator=function(){var a=this;a.options.infinite===!1?1===a.direction?(a.currentSlide+1===a.slideCount-1&&(a.direction=0),a.slideHandler(a.currentSlide+a.options.slidesToScroll)):(0===a.currentSlide-1&&(a.direction=1),a.slideHandler(a.currentSlide-a.options.slidesToScroll)):a.slideHandler(a.currentSlide+a.options.slidesToScroll)},b.prototype.buildArrows=function(){var b=this;b.options.arrows===!0&&b.slideCount>b.options.slidesToShow&&(b.$prevArrow=a('<button type="button" class="slick-prev">Previous</button>').appendTo(b.$slider),b.$nextArrow=a('<button type="button" class="slick-next">Next</button>').appendTo(b.$slider),b.options.infinite!==!0&&b.$prevArrow.addClass("slick-disabled"))},b.prototype.buildDots=function(){var c,d,b=this;if(b.options.dots===!0&&b.slideCount>b.options.slidesToShow){for(d='<ul class="slick-dots">',c=0;c<=b.getDotCount();c+=1)d+="<li>"+b.options.customPaging.call(this,b,c)+"</li>";d+="</ul>",b.$dots=a(d).appendTo(b.$slider),b.$dots.find("li").first().addClass("slick-active")}},b.prototype.buildOut=function(){var b=this;b.$slides=b.$slider.children(b.options.slide+":not(.slick-cloned)").addClass("slick-slide"),b.slideCount=b.$slides.length,b.$slidesCache=b.$slides,b.$slider.addClass("slick-slider"),b.$slideTrack=0===b.slideCount?a('<div class="slick-track"/>').appendTo(b.$slider):b.$slides.wrapAll('<div class="slick-track"/>').parent(),b.$list=b.$slideTrack.wrap('<div class="slick-list"/>').parent(),b.$slideTrack.css("opacity",0),b.options.centerMode===!0&&(b.options.infinite=!0,b.options.slidesToScroll=1,0===b.options.slidesToShow%2&&(b.options.slidesToShow=3)),a("img[data-lazy]",b.$slider).not("[src]").addClass("slick-loading"),b.setupInfinite(),b.buildArrows(),b.buildDots(),b.options.accessibility===!0&&b.$list.prop("tabIndex",0),b.setSlideClasses(0),b.options.draggable===!0&&b.$list.addClass("draggable")},b.prototype.checkResponsive=function(){var c,d,b=this;if(b.originalSettings.responsive&&b.originalSettings.responsive.length>-1&&null!==b.originalSettings.responsive){d=null;for(c in b.breakpoints)b.breakpoints.hasOwnProperty(c)&&a(window).width()<b.breakpoints[c]&&(d=b.breakpoints[c]);null!==d?null!==b.activeBreakpoint?d!==b.activeBreakpoint&&(b.activeBreakpoint=d,b.options=a.extend({},b.defaults,b.breakpointSettings[d]),b.refresh()):(b.activeBreakpoint=d,b.options=a.extend({},b.defaults,b.breakpointSettings[d]),b.refresh()):null!==b.activeBreakpoint&&(b.activeBreakpoint=null,b.options=a.extend({},b.defaults,b.originalSettings),b.refresh())}},b.prototype.changeSlide=function(b){var c=this;switch(b.data.message){case"previous":c.slideHandler(c.currentSlide-c.options.slidesToScroll);break;case"next":c.slideHandler(c.currentSlide+c.options.slidesToScroll);break;case"index":c.slideHandler(a(b.target).parent().index()*c.options.slidesToScroll);break;default:return!1}},b.prototype.destroy=function(){var b=this;b.autoPlayClear(),b.touchObject={},a(".slick-cloned",b.$slider).remove(),b.$dots&&b.$dots.remove(),b.$prevArrow&&(b.$prevArrow.remove(),b.$nextArrow.remove()),b.$slides.unwrap().unwrap(),b.$slides.removeClass("slick-slide slick-active slick-visible").removeAttr("style"),b.$slider.removeClass("slick-slider"),b.$slider.removeClass("slick-initialized"),b.$list.off(".slick"),a(window).off(".slick-"+b.instanceUid)},b.prototype.disableTransition=function(a){var b=this,c={};c[b.transitionType]="",b.options.fade===!1?b.$slideTrack.css(c):b.$slides.eq(a).css(c)},b.prototype.fadeSlide=function(a,b){var c=this;c.cssTransitions===!1?(c.$slides.eq(a).css({zIndex:1e3}),c.$slides.eq(a).animate({opacity:1},c.options.speed,c.options.easing,b)):(c.applyTransition(a),c.$slides.eq(a).css({opacity:1,zIndex:1e3}),b&&setTimeout(function(){c.disableTransition(a),b.call()},c.options.speed))},b.prototype.filterSlides=function(a){var b=this;null!==a&&(b.unload(),b.$slideTrack.children(this.options.slide).remove(),b.$slidesCache.filter(a).appendTo(b.$slideTrack),b.reinit())},b.prototype.getDotCount=function(){var e,a=this,b=0,c=0,d=0;for(e=a.options.infinite===!0?a.slideCount+a.options.slidesToShow-a.options.slidesToScroll:a.slideCount;e>b;)d++,c+=a.options.slidesToScroll,b=c+a.options.slidesToShow;return d},b.prototype.getLeft=function(a){var c,b=this;return b.slideOffset=0,b.options.infinite===!0?(b.slideCount>b.options.slidesToShow&&(b.slideOffset=-1*b.slideWidth*b.options.slidesToShow),0!==b.slideCount%b.options.slidesToScroll&&a+b.options.slidesToScroll>b.slideCount&&b.slideCount>b.options.slidesToShow&&(b.slideOffset=-1*b.slideCount%b.options.slidesToShow*b.slideWidth)):0!==b.slideCount%b.options.slidesToShow&&a+b.options.slidesToScroll>b.slideCount&&b.slideCount>b.options.slidesToShow&&(b.slideOffset=b.slideCount%b.options.slidesToShow*b.slideWidth),b.options.centerMode===!0&&(b.slideOffset+=b.slideWidth*Math.floor(b.options.slidesToShow/2)-b.slideWidth),b.options.vertical===!1?c=-1*a*b.slideWidth+b.slideOffset:(b.listHeight=b.$list.height(),c=b.options.infinite===!0?-1*a*b.listHeight-b.listHeight:-1*a*b.listHeight),c},b.prototype.init=function(){var b=this;a(b.$slider).hasClass("slick-initialized")||(a(b.$slider).addClass("slick-initialized"),b.buildOut(),b.setProps(),b.startLoad(),b.loadSlider(),b.initializeEvents(),b.checkResponsive()),null!==b.options.onInit&&b.options.onInit.call(this,b)},b.prototype.initArrowEvents=function(){var a=this;a.options.arrows===!0&&a.slideCount>a.options.slidesToShow&&(a.$prevArrow.on("click.slick",{message:"previous"},a.changeSlide),a.$nextArrow.on("click.slick",{message:"next"},a.changeSlide))},b.prototype.initDotEvents=function(){var b=this;b.options.dots===!0&&b.slideCount>b.options.slidesToShow&&a("li",b.$dots).on("click.slick",{message:"index"},b.changeSlide)},b.prototype.initializeEvents=function(){var b=this;b.initArrowEvents(),b.initDotEvents(),b.$list.on("touchstart.slick mousedown.slick",{action:"start"},b.swipeHandler),b.$list.on("touchmove.slick mousemove.slick",{action:"move"},b.swipeHandler),b.$list.on("touchend.slick mouseup.slick",{action:"end"},b.swipeHandler),b.$list.on("touchcancel.slick mouseleave.slick",{action:"end"},b.swipeHandler),b.options.pauseOnHover===!0&&b.options.autoplay===!0&&(b.$list.on("mouseenter.slick",b.autoPlayClear),b.$list.on("mouseleave.slick",b.autoPlay)),b.$list.on("keydown.slick",b.keyHandler),a(window).on("orientationchange.slick.slick-"+b.instanceUid,function(){b.checkResponsive(),b.setPosition()}),a(window).on("resize.slick.slick-"+b.instanceUid,function(){a(window).width!==b.windowWidth&&(clearTimeout(b.windowDelay),b.windowDelay=window.setTimeout(function(){b.windowWidth=a(window).width(),b.checkResponsive(),b.setPosition()},50))}),a(window).on("load.slick.slick-"+b.instanceUid,b.setPosition)},b.prototype.initUI=function(){var a=this;a.options.arrows===!0&&a.slideCount>a.options.slidesToShow&&(a.$prevArrow.show(),a.$nextArrow.show()),a.options.dots===!0&&a.slideCount>a.options.slidesToShow&&a.$dots.show(),a.options.autoplay===!0&&a.autoPlay()},b.prototype.keyHandler=function(a){var b=this;37===a.keyCode?b.changeSlide({data:{message:"previous"}}):39===a.keyCode&&b.changeSlide({data:{message:"next"}})},b.prototype.lazyLoad=function(){var c,d,e,f,b=this;b.options.centerMode===!0?(e=b.options.slidesToShow+b.currentSlide-1,f=e+b.options.slidesToShow+2):(e=b.options.infinite?b.options.slidesToShow+b.currentSlide:b.currentSlide,f=e+b.options.slidesToShow),c=b.$slider.find(".slick-slide").slice(e,f),a("img[data-lazy]",c).not("[src]").each(function(){a(this).attr("src",a(this).attr("data-lazy")).removeClass("slick-loading")}),b.currentSlide>=b.slideCount-b.options.slidesToShow?(d=b.$slider.find(".slick-cloned").slice(0,b.options.slidesToShow),a("img[data-lazy]",d).not("[src]").each(function(){a(this).attr("src",a(this).attr("data-lazy")).removeClass("slick-loading")})):0===b.currentSlide&&(d=b.$slider.find(".slick-cloned").slice(-1*b.options.slidesToShow),a("img[data-lazy]",d).not("[src]").each(function(){a(this).attr("src",a(this).attr("data-lazy")).removeClass("slick-loading")}))},b.prototype.loadSlider=function(){var a=this;a.setPosition(),a.$slideTrack.css({opacity:1}),a.$slider.removeClass("slick-loading"),a.initUI(),"progressive"===a.options.lazyLoad&&a.progressiveLazyLoad()},b.prototype.postSlide=function(a){var b=this;null!==b.options.onAfterChange&&a!==b.currentSlide&&b.options.onAfterChange.call(this,b,a),b.animating=!1,b.setPosition(),b.swipeLeft=null,b.options.autoplay===!0&&b.paused===!1&&b.autoPlay(),b.setSlideClasses(b.currentSlide)},b.prototype.progressiveLazyLoad=function(){var c,d,b=this;c=a("img[data-lazy]").not("[src]").length,c>0&&(d=a(a("img[data-lazy]",b.$slider).not("[src]").get(0)),d.attr("src",d.attr("data-lazy")).removeClass("slick-loading").load(function(){b.progressiveLazyLoad()}))},b.prototype.refresh=function(){var b=this;b.destroy(),a.extend(b,b.initials),b.init()},b.prototype.reinit=function(){var b=this;b.$slides=a(b.options.slide+":not(.slick-cloned)",b.$slideTrack).addClass("slick-slide"),b.slideCount=b.$slides.length,b.currentSlide>=b.slideCount&&0!==b.currentSlide&&(b.currentSlide=b.currentSlide-b.options.slidesToScroll),b.setProps(),b.setupInfinite(),b.buildArrows(),b.updateArrows(),b.initArrowEvents(),b.buildDots(),b.updateDots(),b.initDotEvents(),b.setSlideClasses(0),b.setPosition(),null!==b.options.onReInit&&b.options.onReInit.call(this,b)},b.prototype.removeSlide=function(a,b){var c=this;return"boolean"==typeof a?(b=a,a=b===!0?0:c.slideCount-1):a=b===!0?--a:a,c.slideCount<1||0>a||a>c.slideCount-1?!1:(c.unload(),c.$slideTrack.children(this.options.slide).eq(a).remove(),c.$slides=c.$slideTrack.children(this.options.slide),c.$slideTrack.children(this.options.slide).remove(),c.$slideTrack.append(c.$slides),c.$slidesCache=c.$slides,c.reinit(),void 0)},b.prototype.setCSS=function(a){var d,e,b=this,c={};d="left"==b.positionProp?a+"px":"0px",e="top"==b.positionProp?a+"px":"0px",c[b.positionProp]=a,b.transformsEnabled===!1?b.$slideTrack.css(c):(c={},b.cssTransitions===!1?(c[b.animType]="translate("+d+", "+e+")",b.$slideTrack.css(c)):(c[b.animType]="translate3d("+d+", "+e+", 0px)",b.$slideTrack.css(c)))},b.prototype.setDimensions=function(){var a=this;a.options.centerMode===!0?a.$list.find(".slick-slide").width(a.slideWidth):a.$list.find(".slick-slide").width(a.slideWidth),a.options.vertical===!1?(a.$slideTrack.width(Math.ceil(a.slideWidth*a.$slider.find(".slick-slide").length)),a.options.centerMode===!0&&a.$list.css({padding:"0px "+a.options.centerPadding})):(a.$list.height(a.$slides.first().outerHeight()),a.$slideTrack.height(Math.ceil(a.listHeight*a.$slider.find(".slick-slide").length)),a.options.centerMode===!0&&a.$list.css({padding:a.options.centerPadding+" 0px"}))},b.prototype.setFade=function(){var c,b=this;b.$slides.each(function(d,e){c=-1*b.slideWidth*d,a(e).css({position:"relative",left:c,top:0,zIndex:800,opacity:0})}),b.$slides.eq(b.currentSlide).css({zIndex:900,opacity:1})},b.prototype.setPosition=function(){var a=this;a.setValues(),a.setDimensions(),a.options.fade===!1?a.setCSS(a.getLeft(a.currentSlide)):a.setFade()},b.prototype.setProps=function(){var a=this;a.positionProp=a.options.vertical===!0?"top":"left","top"===a.positionProp?a.$slider.addClass("slick-vertical"):a.$slider.removeClass("slick-vertical"),(void 0!==document.body.style.WebkitTransition||void 0!==document.body.style.MozTransition||void 0!==document.body.style.msTransition)&&(a.cssTransitions=!0),void 0!==document.body.style.MozTransform&&(a.animType="MozTransform",a.transformType="-moz-transform",a.transitionType="MozTransition"),void 0!==document.body.style.webkitTransform&&(a.animType="webkitTransform",a.transformType="-webkit-transform",a.transitionType="webkitTransition"),void 0!==document.body.style.msTransform&&(a.animType="transform",a.transformType="transform",a.transitionType="transition"),a.transformsEnabled=null!==a.animType},b.prototype.setValues=function(){var a=this;a.listWidth=a.$list.width(),a.listHeight=a.$list.height(),a.slideWidth=Math.ceil(a.listWidth/a.options.slidesToShow)},b.prototype.setSlideClasses=function(a){var c,d,e,b=this;b.$slider.find(".slick-slide").removeClass("slick-active").removeClass("slick-center"),d=b.$slider.find(".slick-slide"),b.options.centerMode===!0?(c=Math.floor(b.options.slidesToShow/2),a>=c&&a<=b.slideCount-1-c?b.$slides.slice(a-c,a+c+1).addClass("slick-active"):(e=b.options.slidesToShow+a,d.slice(e-c+1,e+c+2).addClass("slick-active")),0===a?d.eq(d.length-1-b.options.slidesToShow).addClass("slick-center"):a===b.slideCount-1&&d.eq(b.options.slidesToShow).addClass("slick-center"),b.$slides.eq(a).addClass("slick-center")):a>0&&a<b.slideCount-b.options.slidesToShow?b.$slides.slice(a,a+b.options.slidesToShow).addClass("slick-active"):(e=b.options.slidesToShow+a,d.slice(e,e+b.options.slidesToShow).addClass("slick-active")),"ondemand"===b.options.lazyLoad&&b.lazyLoad()},b.prototype.setupInfinite=function(){var c,d,e,b=this;if((b.options.fade===!0||b.options.vertical===!0)&&(b.options.slidesToShow=1,b.options.slidesToScroll=1,b.options.centerMode=!1),b.options.infinite===!0&&b.options.fade===!1&&(d=null,b.slideCount>b.options.slidesToShow)){for(e=b.options.centerMode===!0?b.options.slidesToShow+1:b.options.slidesToShow,c=b.slideCount;c>b.slideCount-e;c-=1)d=c-1,a(b.$slides[d]).clone().attr("id","").prependTo(b.$slideTrack).addClass("slick-cloned");for(c=0;e>c;c+=1)d=c,a(b.$slides[d]).clone().attr("id","").appendTo(b.$slideTrack).addClass("slick-cloned");b.$slideTrack.find(".slick-cloned").find("[id]").each(function(){a(this).attr("id","")})}},b.prototype.slideHandler=function(a){var b,c,d,e,f=null,g=this;return g.animating===!0?!1:(b=a,f=g.getLeft(b),d=g.getLeft(g.currentSlide),e=0!==g.slideCount%g.options.slidesToScroll?g.options.slidesToScroll:0,g.options.infinite===!1&&(0>a||a>g.slideCount-g.options.slidesToShow+e)?(b=g.currentSlide,g.animateSlide(d,function(){g.postSlide(b)}),!1):(g.options.autoplay===!0&&clearInterval(g.autoPlayTimer),g.currentLeft=null===g.swipeLeft?d:g.swipeLeft,c=0>b?0!==g.slideCount%g.options.slidesToScroll?g.slideCount-g.slideCount%g.options.slidesToScroll:g.slideCount-g.options.slidesToScroll:b>g.slideCount-1?0:b,g.animating=!0,null!==g.options.onBeforeChange&&a!==g.currentSlide&&g.options.onBeforeChange.call(this,g,g.currentSlide),g.currentSlide=c,g.updateDots(),g.updateArrows(),g.options.fade===!0?(g.fadeSlide(c,function(){g.postSlide(c)}),!1):(g.animateSlide(f,function(){g.postSlide(c)}),void 0)))},b.prototype.startLoad=function(){var a=this;a.options.arrows===!0&&a.slideCount>a.options.slidesToShow&&(a.$prevArrow.hide(),a.$nextArrow.hide()),a.options.dots===!0&&a.slideCount>a.options.slidesToShow&&a.$dots.hide(),a.$slider.addClass("slick-loading")},b.prototype.swipeDirection=function(){var a,b,c,d,e=this;return a=e.touchObject.startX-e.touchObject.curX,b=e.touchObject.startY-e.touchObject.curY,c=Math.atan2(b,a),d=Math.round(180*c/Math.PI),0>d&&(d=360-Math.abs(d)),45>=d&&d>=0?"left":360>=d&&d>=315?"left":d>=135&&225>=d?"right":"vertical"},b.prototype.swipeEnd=function(b){var c=this;if(c.$list.removeClass("dragging"),void 0===c.touchObject.curX)return!1;if(c.touchObject.swipeLength>=c.touchObject.minSwipe)switch(a(b.target).on("click.slick",function(b){b.stopImmediatePropagation(),b.stopPropagation(),b.preventDefault(),a(b.target).off("click.slick")}),c.swipeDirection()){case"left":c.slideHandler(c.currentSlide+c.options.slidesToScroll),c.touchObject={};break;case"right":c.slideHandler(c.currentSlide-c.options.slidesToScroll),c.touchObject={}}else c.touchObject.startX!==c.touchObject.curX&&(c.slideHandler(c.currentSlide),c.touchObject={})},b.prototype.swipeHandler=function(a){var b=this;if("ontouchend"in document&&b.options.swipe===!1)return!1;if(b.options.draggable===!1&&!a.originalEvent.touches)return!1;switch(b.touchObject.fingerCount=a.originalEvent&&void 0!==a.originalEvent.touches?a.originalEvent.touches.length:1,b.touchObject.minSwipe=b.listWidth/b.options.touchThreshold,a.data.action){case"start":b.swipeStart(a);break;case"move":b.swipeMove(a);break;case"end":b.swipeEnd(a)}},b.prototype.swipeMove=function(a){var c,d,e,f,b=this;return f=void 0!==a.originalEvent?a.originalEvent.touches:null,c=b.getLeft(b.currentSlide),!b.$list.hasClass("dragging")||f&&1!==f.length?!1:(b.touchObject.curX=void 0!==f?f[0].pageX:a.clientX,b.touchObject.curY=void 0!==f?f[0].pageY:a.clientY,b.touchObject.swipeLength=Math.round(Math.sqrt(Math.pow(b.touchObject.curX-b.touchObject.startX,2))),d=b.swipeDirection(),"vertical"===d?!1:(void 0!==a.originalEvent&&a.preventDefault(),e=b.touchObject.curX>b.touchObject.startX?1:-1,b.swipeLeft=b.options.vertical===!1?c+b.touchObject.swipeLength*e:c+b.touchObject.swipeLength*(b.listHeight/b.listWidth)*e,b.options.fade===!0||b.options.touchMove===!1?!1:b.animating===!0?(b.swipeLeft=null,!1):(b.setCSS(b.swipeLeft),void 0)))},b.prototype.swipeStart=function(a){var c,b=this;return 1!==b.touchObject.fingerCount||b.slideCount<=b.options.slidesToShow?(b.touchObject={},!1):(void 0!==a.originalEvent&&void 0!==a.originalEvent.touches&&(c=a.originalEvent.touches[0]),b.touchObject.startX=b.touchObject.curX=void 0!==c?c.pageX:a.clientX,b.touchObject.startY=b.touchObject.curY=void 0!==c?c.pageY:a.clientY,b.$list.addClass("dragging"),void 0)},b.prototype.unfilterSlides=function(){var a=this;null!==a.$slidesCache&&(a.unload(),a.$slideTrack.children(this.options.slide).remove(),a.$slidesCache.appendTo(a.$slideTrack),a.reinit())},b.prototype.unload=function(){var b=this;a(".slick-cloned",b.$slider).remove(),b.$dots&&b.$dots.remove(),b.$prevArrow&&(b.$prevArrow.remove(),b.$nextArrow.remove()),b.$slides.removeClass("slick-slide slick-active slick-visible").removeAttr("style")},b.prototype.updateArrows=function(){var a=this;a.options.arrows===!0&&a.options.infinite!==!0&&a.slideCount>a.options.slidesToShow&&(a.$prevArrow.removeClass("slick-disabled"),a.$nextArrow.removeClass("slick-disabled"),0===a.currentSlide?(a.$prevArrow.addClass("slick-disabled"),a.$nextArrow.removeClass("slick-disabled")):a.currentSlide>=a.slideCount-a.options.slidesToShow&&(a.$nextArrow.addClass("slick-disabled"),a.$prevArrow.removeClass("slick-disabled")))},b.prototype.updateDots=function(){var a=this;null!==a.$dots&&(a.$dots.find("li").removeClass("slick-active"),a.$dots.find("li").eq(a.currentSlide/a.options.slidesToScroll).addClass("slick-active"))},a.fn.slick=function(a){var c=this;return c.each(function(c,d){d.slick=new b(d,a)})},a.fn.slickAdd=function(a,b,c){var d=this;return d.each(function(d,e){e.slick.addSlide(a,b,c)})},a.fn.slickFilter=function(a){var b=this;return b.each(function(b,c){c.slick.filterSlides(a)})},a.fn.slickGoTo=function(a){var b=this;return b.each(function(b,c){c.slick.slideHandler(a)})},a.fn.slickNext=function(){var a=this;return a.each(function(a,b){b.slick.changeSlide({data:{message:"next"}})})},a.fn.slickPause=function(){var a=this;return a.each(function(a,b){b.slick.autoPlayClear(),b.slick.paused=!0})},a.fn.slickPlay=function(){var a=this;return a.each(function(a,b){b.slick.paused=!1,b.slick.autoPlay()})},a.fn.slickPrev=function(){var a=this;return a.each(function(a,b){b.slick.changeSlide({data:{message:"previous"}})})},a.fn.slickRemove=function(a,b){var c=this;return c.each(function(c,d){d.slick.removeSlide(a,b)})},a.fn.slickSetOption=function(a,b,c){var d=this;return d.each(function(d,e){e.slick.options[a]=b,c===!0&&(e.slick.unload(),e.slick.reinit())})},a.fn.slickUnfilter=function(){var a=this;return a.each(function(a,b){b.slick.unfilterSlides()})},a.fn.unslick=function(){var a=this;return a.each(function(a,b){b.slick.destroy()})}}); \ No newline at end of file
diff --git a/static/website/slick/slick.scss b/static/website/slick/slick.scss
new file mode 100644
index 0000000..fe1eb2d
--- /dev/null
+++ b/static/website/slick/slick.scss
@@ -0,0 +1,223 @@
+/* Slider */
+
+.slick-slider {
+ position: relative;
+ display: block;
+ box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ -webkit-touch-callout: none;
+ -webkit-user-select: none;
+ -khtml-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+ -ms-touch-action: none;
+ touch-action: none;
+ -webkit-tap-highlight-color: rgba(0,0,0,0);
+}
+.slick-list {
+ position: relative;
+ overflow: hidden;
+ display: block;
+ margin: 0;
+ padding: 0;
+
+ &:focus {
+ outline: none;
+ }
+
+ .slick-loading & {
+ background: #fff url(./ajax-loader.gif) center center no-repeat;
+ }
+
+ &.dragging {
+ cursor: pointer;
+ cursor: hand;
+ }
+}
+.slick-slider .slick-list,
+.slick-track,
+.slick-slide,
+.slick-slide img {
+ -webkit-transform: translate3d(0, 0, 0);
+ -moz-transform: translate3d(0, 0, 0);
+ -ms-transform: translate3d(0, 0, 0);
+ -o-transform: translate3d(0, 0, 0);
+ transform: translate3d(0, 0, 0);
+}
+.slick-track {
+ position: relative;
+ left: 0;
+ top: 0;
+ display: block;
+ zoom: 1;
+
+ &:before,
+ &:after {
+ content: "";
+ display: table;
+ }
+
+ &:after {
+ clear: both;
+ }
+
+ .slick-loading & {
+ visibility: hidden;
+ }
+}
+.slick-slide {
+ float: left;
+ height: 100%;
+ min-height: 1px;
+ img {
+ display: block;
+ &.slick-loading {
+ background: white url(./ajax-loader.gif) center center no-repeat;
+ padding-bottom: 100%;
+ }
+ }
+
+ display: none;
+
+ &.dragging img {
+ pointer-events: none;
+ }
+
+ .slick-initialized & {
+ display: block;
+ }
+
+ .slick-loading & {
+ visibility: hidden;
+ }
+
+ .slick-vertical & {
+ display: block;
+ height: auto;
+ border: 1px solid transparent;
+ }
+}
+
+/* Icons */
+
+ @charset"UTF-8";
+ @font-face {
+ font-family:"slick";
+ src:url("./fonts/slick.eot");
+ src:url("./fonts/slick.eot?#iefix") format("embedded-opentype"), url("./fonts/slick.woff") format("woff"), url("./fonts/slick.ttf") format("truetype"), url("./fonts/slick.svg#slick") format("svg");
+ font-weight: normal;
+ font-style: normal;
+}
+
+/* Arrows */
+
+.slick-prev,
+.slick-next {
+ position: absolute;
+ display: block;
+ height: 20px;
+ width: 20px;
+ line-height: 0;
+ font-size: 0;
+ cursor: pointer;
+ background: transparent;
+ color: transparent;
+ top: 50%;
+ margin-top: -10px;
+ padding: 0;
+ border: none;
+ outline: none;
+ &:focus {
+ outline: none;
+ }
+ &.slick-disabled:before {
+ opacity: 0.25;
+ }
+}
+.slick-prev:before, .slick-next:before {
+ font-family:"slick";
+ font-size: 20px;
+ line-height: 1;
+ color: white;
+ opacity: 0.85;
+ -webkit-font-smoothing: antialiased;
+ -moz-osx-font-smoothing: grayscale;
+}
+.slick-prev {
+ left: -25px;
+ &:before {
+ content:'\2190';
+ }
+}
+.slick-next {
+ right: -25px;
+ &:before {
+ content:'\2192';
+ }
+}
+
+/* Dots */
+
+.slick-slider {
+ margin-bottom: 30px;
+}
+.slick-dots {
+ position: absolute;
+ bottom: -45px;
+ list-style: none;
+ display: block;
+ text-align: center;
+ padding: 0px;
+ width: 100%;
+
+ li {
+ position: relative;
+ display: inline-block;
+ height: 20px;
+ width: 20px;
+ margin: 0px 5px;
+ padding: 0px;
+ cursor: pointer;
+
+ button {
+ border: 0;
+ background: transparent;
+ display: block;
+ height: 20px;
+ width: 20px;
+ outline: none;
+ line-height: 0;
+ font-size: 0;
+ color: transparent;
+ padding: 5px;
+ cursor: pointer;
+ outline: none;
+ &:focus {
+ outline: none;
+ }
+
+ &:before {
+ position: absolute;
+ top: 0;
+ left: 0;
+ content:'\2022';
+ width: 20px;
+ height: 20px;
+ font-family:"slick";
+ font-size: 6px;
+ line-height: 20px;
+ text-align: center;
+ color: black;
+ opacity: 0.25;
+ -webkit-font-smoothing: antialiased;
+ -moz-osx-font-smoothing: grayscale;
+ }
+
+ }
+
+ &.slick-active button:before {
+ opacity: 0.75;
+ }
+ }
+} \ No newline at end of file
diff --git a/static/website/templates/ajax-keyword-search.html b/static/website/templates/ajax-keyword-search.html
index db9fbc7..b4295c7 100644
--- a/static/website/templates/ajax-keyword-search.html
+++ b/static/website/templates/ajax-keyword-search.html
@@ -8,7 +8,7 @@
<th> Question</th>
<th> Date</th>
<th> Views</th>
- <th> Replies</th>
+ <th> Answers</th>
<th> User</th>
{% for question in questions %}
<tr>
@@ -65,7 +65,7 @@
</td>
<td>
- {{ question.reply_set.count }}
+ {{ question.answer_set.count }}
</td>
<td>
diff --git a/static/website/templates/ajax-time-search.html b/static/website/templates/ajax-time-search.html
index 0b1673c..57be751 100644
--- a/static/website/templates/ajax-time-search.html
+++ b/static/website/templates/ajax-time-search.html
@@ -8,7 +8,7 @@
<th> Question</th>
<th> Date</th>
<th> Views</th>
- <th> Replies</th>
+ <th> Answers</th>
<th> User</th>
{% for question in questions %}
<tr>
@@ -65,7 +65,7 @@
</td>
<td>
- {{ question.reply_set.count }}
+ {{ question.answer_set.count }}
</td>
<td>
diff --git a/static/website/templates/base.html b/static/website/templates/base.html
index 26e24c4..172c901 100644
--- a/static/website/templates/base.html
+++ b/static/website/templates/base.html
@@ -1,20 +1,15 @@
+{% load compress %}
{% load static %}
<html>
<head>
<title>Spoken-Tutorial Forums</title>
+ {% compress css %}
<link rel="stylesheet" href="{% static 'website/css/bootstrap.min.css' %}" type="text/css" media="screen" charset="utf-8" />
+ <link rel="stylesheet" href="{% static 'website/slick/slick.css' %}" type="text/css" media="screen" charset="utf-8" />
<link rel="stylesheet" href="{% static 'website/css/main.css' %}" type="text/css" media="screen" charset="utf-8" />
- <link rel="stylesheet" href="{% static 'website/css/nice-bar.css' %}" type="text/css" media="screen" charset="utf-8" />
+ {% endcompress %}
</head>
<body>
- <div class="nice-bar">
- <p class="nice-text">
- One day CFD workshop on 22<sup>nd</sup> March 2014.
- <a class="nice-button" href="http://cfd.fossee.in/workshop">View more</a> details about the workshop.
- <a class="nice-button" href="http://cfdworkshop.doattend.com">Click here</a> for registration.
- <span class="nice-close">x</span>
- </p>
- </div>
<div id="page-wrapper">
<div id="header-wrapper">
<div id="header-inner">
@@ -29,11 +24,11 @@
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="{% url 'website:home' %}">
- <img id="logo" src="http://spoken-tutorial.org/sites/all/themes/spoken/images/logo.png">
+ <img id="logo" src="{% static 'website/images/logo.png' %}">
Spoken Tutorial Forums
</a>
</div> <!-- /.navbar-header -->
-
+
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav navbar-right">
@@ -57,7 +52,7 @@
</a>
<ul class="dropdown-menu">
<li><a href="{% url 'website:user_questions' user.id %}">My Questions</a></li>
- <li><a href="{% url 'website:user_replies' user.id %}">My Replies</a></li>
+ <li><a href="{% url 'website:user_answers' user.id %}">My Answers</a></li>
<li>
<a href="{% url 'website:user_notifications' user.id %}">
Notifications
@@ -111,12 +106,14 @@
</div> <!-- /#footer-inner -->
</div> <!-- /#footer-wrapper -->
</div> <!-- /#page-wrapper -->
-
+
+ {% compress js %}
<script src="{% static 'website/js/jquery.min.js' %}"></script>
<script src="{% static 'website/js/bootstrap.min.js' %}"></script>
-
+ <script src="{% static 'website/slick/slick.min.js' %}"></script>
{% block javascript %}
<!-- overide with custom javascript -->
{% endblock %}
+ {% endcompress %}
</body>
</html>
diff --git a/static/website/templates/filter.html b/static/website/templates/filter.html
index 64eeb5c..dada403 100644
--- a/static/website/templates/filter.html
+++ b/static/website/templates/filter.html
@@ -80,7 +80,7 @@
<th> Question</th>
<th> Date</th>
<th> Views</th>
- <th> Replies</th>
+ <th> Answers</th>
<th> User</th>
{% for question in questions %}
<tr>
@@ -137,7 +137,7 @@
</td>
<td>
- {{ question.reply_set.count }}
+ {{ question.answer_set.count }}
</td>
<td>
diff --git a/static/website/templates/get-question.html b/static/website/templates/get-question.html
index 1a3d96b..af9e4a2 100644
--- a/static/website/templates/get-question.html
+++ b/static/website/templates/get-question.html
@@ -8,131 +8,191 @@
<span class="saving hideme">saving . . .</span>
<span class="saved hideme">saved</span>
-<div class="question {% if user|can_edit:question %}editable{% endif %}">
- <div class="title {% if user|can_edit:question %}title-editable{% endif %}">
- {{ question.title }}
- </div>
-
- <div id="title-edit" class="hideme">
- <h5>Title</h5>
- <input class="form-control" type="text">
- <h5>Question</h5>
- </div>
-
- <div id="questionNicPanel"></div>
- <div id="{% if user|can_edit:question %}questionInstance{% endif %}" class="body">
- {{ question.body|safe }}
- </div>
- <br>
-
- <span class="category">
- <small>
- <a href="{% url 'website:filter' question.category %}">
- {{ question.category }}
- </a>
- </small>
- </span>
-
- <span class="tutorial">
- <small>
- <a href="{% url 'website:filter' question.category question.tutorial %}">
- {{ question.tutorial}}
- </a>
- </small>
- </span>
-
- <span class="minute_range {% if question.minute_range == 'None' %}hideme{% endif %}">
- <small>
- <a href="{% url 'website:filter' question.category question.tutorial question.minute_range %}">
- {{ question.minute_range }} min
- </a>
- </small>
- </span>
-
- <span class="second_range {% if question.minute_range == 'None' %}hideme{% endif %}">
- <small>
- <a href="{% url 'website:filter' question.category question.tutorial question.minute_range question.second_range%}">
- {{ question.second_range }} sec
- </a>
- </small>
- </span>
-
- <a id="question-details-edit" data-toggle="modal" data-target="#detailsModal" href="#" class="hideme">
- <span class="glyphicon glyphicon-edit"></span>
- </a>
-
- <span class="modify">
- {% if user|can_edit:question %}
- <a class="edit btn btn-xs btn-info" href="#">Edit</a>
- <a class="save btn btn-xs btn-success" data-qid="{{ question.id }}" href="#">Save</a>
- {% endif %}
- </span>
-
- <span class="meta">
- <small>
- <i>
- {{ question.date_created|date:"d-m-y" }}, {{ question.date_created|time }}
- </i>
- </small>
-
- <span class="user">
- {{ question.user }}
- </span>
- </span>
- </div> <!-- /.question -->
-
-<h4><u>Answers:</u></h4>
-
-<div id="replyPanelWrapper" style="display:none;">
- <div id="replyNicPanel" style="display:none;"></div>
-</div>
-
-{% for reply in replies %}
- <div class="reply {% if user|can_edit:reply %}editable{% endif %}" id="reply{{reply.id}}">
+<div class="row">
+ <div class="col-lg-12 question-wrapper">
+ <div class="question {% if user|can_edit:question %}editable{% endif %}">
+ <div class="title {% if user|can_edit:question %}title-editable{% endif %}">
+ {{ question.title }}
+ </div>
- <div class="body" id="body{{ reply.id }}">
- {{ reply.body|safe }}
+ <div id="title-edit" class="hideme">
+ <h5>Title</h5>
+ <input class="form-control" type="text">
+ <h5>Question</h5>
</div>
-
+
+ <div id="questionNicPanel"></div>
+ <div id="{% if user|can_edit:question %}questionInstance{% endif %}" class="body">
+ {{ question.body|safe }}
+ </div>
+ <br>
+
+ <span class="category">
+ <small>
+ <a href="{% url 'website:filter' question.category %}">
+ {{ question.category }}
+ </a>
+ </small>
+ </span>
+
+ <span class="tutorial">
+ <small>
+ <a href="{% url 'website:filter' question.category question.tutorial %}">
+ {{ question.tutorial}}
+ </a>
+ </small>
+ </span>
+
+ <span class="minute_range {% if question.minute_range == 'None' %}hideme{% endif %}">
+ <small>
+ <a href="{% url 'website:filter' question.category question.tutorial question.minute_range %}">
+ {{ question.minute_range }} min
+ </a>
+ </small>
+ </span>
+
+ <span class="second_range {% if question.minute_range == 'None' %}hideme{% endif %}">
+ <small>
+ <a href="{% url 'website:filter' question.category question.tutorial question.minute_range question.second_range%}">
+ {{ question.second_range }} sec
+ </a>
+ </small>
+ </span>
+
+ <a id="question-details-edit" data-toggle="modal" data-target="#detailsModal" href="#" class="hideme">
+ <span class="glyphicon glyphicon-edit"></span>
+ </a>
+
+ <span class="modify">
+ {% if user|can_edit:question %}
+ <a class="edit btn btn-xs btn-info" href="#">Edit</a>
+ <a class="save btn btn-xs btn-success" data-qid="{{ question.id }}" href="#">Save</a>
+ {% endif %}
+ </span>
+
<span class="meta">
<small>
<i>
- {{ reply.date_created|date:"d-m-y" }}, {{ reply.date_created|time }}
+ {{ question.date_created|date:"d-m-y" }}, {{ question.date_created|time }}
</i>
</small>
-
+
<span class="user">
- {{ reply.user }}
+ {{ question.user }}
</span>
</span>
+ </div> <!-- /.question -->
+ </div>
+</div> <!-- /.row -->
- {% if user|can_edit:reply %}
- <span class="modify" style="display:block">
- <a class="edit btn btn-xs btn-info vs" href="#body{{ reply.id}}" data-target="body{{ reply.id }}">Edit</a>
- <a class="save btn btn-xs btn-success vs" data-target="body{{ reply.id }}" data-rid="{{ reply.id }}" href="#">Save</a>
- </span>
- {% endif %}
- </div> <!-- /.reply -->
+<h4><u>Answers:</u></h4>
+<div id="answerPanelWrapper" style="display:none;">
+ <div id="answerNicPanel" style="display:none;"></div>
+</div>
+
+<div id="commentPanelWrapper" style="display:none;">
+ <div id="commentNicPanel" style="display:none;"></div>
+</div>
+
+{% for answer in answers %}
+<div class="row">
+ <div class="col-lg-12 answer-wrapper">
+ <div class="answer {% if user|can_edit:answer %}editable{% endif %}" id="answer{{answer.id}}">
+
+ <div class="body" id="body{{ answer.id }}">
+ {{ answer.body|safe }}
+ </div>
+
+ <span class="user">
+ {{ answer.user }}
+ </span>
+
+ {% if user|can_edit:answer %}
+ <span class="modify" style="display:block">
+ <a class="edit btn btn-xs btn-info vs" href="#body{{ answer.id}}" data-target="body{{ answer.id }}">Edit</a>
+ <a class="save btn btn-xs btn-success vs" data-target="body{{ answer.id }}" data-aid="{{ answer.id }}" href="#">Save</a>
+ </span>
+ {% endif %}
+ </div> <!-- /.answer -->
+
+ <div class="row">
+ <div class="comments col-lg-11 pull-right">
+ <!-- displaying comments -->
+ {% for comment in answer.answercomment_set.all %}
+ <div class="comment" id="comment{{ comment.id }}">
+ <div class="body" id="cbody{{ comment.id }}">
+ {{ comment.body|safe }}
+ </div>
+
+ <span class="meta">
+ <small>
+ <i>
+ {{ comment.date_created|date:"d-m-y" }}, {{ question.date_created|time }}
+ </i>
+ </small>
+
+ <span class="user">
+ {{ comment.user }}
+ </span>
+ </span>
+ {% if user|can_edit:comment %}
+ <div class="modify-wrapper">
+ <span class="modify" style="display:block">
+ <a class="edit btn btn-xs btn-info vs" href="#cbody{{ comment.id }}" data-target="cbody{{ comment.id }}">Edit</a>
+ <a class="save btn btn-xs btn-success vs" data-target="cbody{{ comment.id }}" data-cid="{{ comment.id }}" href="#">Save</a>
+ </span>
+ </div>
+ {% endif %}
+ </div> <!-- /.comment -->
+ {% endfor %}
+
+
+ <!-- form to add comment -->
+ {% if user.is_authenticated %}
+ <form id="form{{ answer.id }}" method="post" action="/answer-comment/"> {% csrf_token %}
+ <input type="hidden" name="answer_id" value="{{answer.id}}">
+ <textarea name="body" class="new-comment form-control" id="comment{{ answer.id }}" rows="2"></textarea>
+ </form>
+ <a class="add-comment" href="#" data-target="comment{{ answer.id }}">
+ <small>add comment</small>
+ </a>
+ <a class="post-comment" href="#" data-target="comment{{ answer.id }}" data-aid="{{ answer.id }}" data-form="form{{ answer.id }}">
+ <small>post comment</small>
+ </a>
+ <a class="cancel-comment" href="#" data-target="comment{{ answer.id }}">
+ <small>cancel comment</small>
+ </a>
+ {% else %}
+ <br>
+ <a class="btn btn-xs btn-success vs" href="/accounts/login">
+ Login to add comment
+ </a>
+ {% endif %}
+ </div> <!-- comments -->
+ </div> <!-- /.row -->
+ <br> <hr>
+ </div> <!-- /.answer-wrapper -->
+</div> <!-- /.row -->
{% endfor %}
{% if user.is_authenticated %}
- <form action="{% url 'website:question_reply' %}" method="POST"> {% csrf_token %}
+ <form action="{% url 'website:question_answer' %}" method="POST"> {% csrf_token %}
{% with WIDGET_ERROR_CLASS='field_error' %}
<div class="row">
<div class="col-lg-12">
<div class="form-group">
{% render_field form.question value=question.id %}
- <label for="id_body">Reply</label>
+ <label for="id_body">Answer</label>
{% render_field form.body class+='form-control' %}
</div>
</div>
</div>
{% endwith %}
- <input class="btn btn-sm btn-info" type="submit" value="Submit Reply">
+ <input class="btn btn-sm btn-info" type="submit" value="Submit Answer">
</form>
{% else %}
<h4>
- <a class="btn btn-xs btn-success" href="{% url 'user_login'%}"><b>Log-in</b></a> to reply to this question.
+ <a class="btn btn-xs btn-success" href="{% url 'user_login'%}"><b>Log-in</b></a> to answer to this question.
</h4>
{% endif %}
@@ -145,7 +205,7 @@
<h4 class="modal-title" id="myModalLabel">Edit Question Details</h4>
</div>
<div class="modal-body">
-
+
<h5>The Current question is under:</h5>
{{ question.category }}
--&gt; {{ question.tutorial }}
@@ -155,7 +215,7 @@
{% if question.second_range != 'None' %}
--&gt; {{ question.second_range}}
{% endif %}
-
+
<h5>Move the question to:</h5>
<div class="row">
<div class="col-lg-4 col-md-4 col-sm-4">
@@ -232,7 +292,6 @@
<a class="btn btn-sm btn-default" data-dismiss="modal" href="#">Close</a>
</div>
<div class="clearfix"></div>
-
</div> <!-- /.modal-body -->
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
@@ -252,4 +311,29 @@
{% block javascript %}
<script src="{% static 'website/js/thread-user.js' %}"></script>
<script src="{% static 'website/js/custom.js' %}"></script>
+ <script>
+ $(document).ready(function() {
+ $vote = $(".vote");
+
+ $vote.click(function() {
+ if($(this).hasClass("upvote")) {
+ /* handle upvote click event */
+ if($(this).hasClass("voted")) {
+ $(this).removeClass("voted");
+ } else {
+ $(this).addClass("voted");
+ $(this).siblings(".downvote").removeClass("voted");
+ }
+ } else {
+ /* handle downvote click event */
+ if($(this).hasClass("voted")) {
+ $(this).removeClass("voted");
+ } else {
+ $(this).addClass("voted");
+ $(this).siblings(".upvote").removeClass("voted");
+ }
+ }
+ });
+ });
+ </script>
{% endblock %}
diff --git a/static/website/templates/index.html b/static/website/templates/index.html
index 5046c13..4162e42 100644
--- a/static/website/templates/index.html
+++ b/static/website/templates/index.html
@@ -1,106 +1,172 @@
{% extends 'website/templates/base.html' %}
{% load static %}
-{% block content %}
{% load count_tags %}
-<h4><u>Recent Questions</u></h4>
-<table class="table table-bordered table-hover">
- <th> FOSS </th>
- <th> Tutorial</th>
- <th> Min </th>
- <th> Sec </th>
- <th> Question</th>
- <th> Date</th>
- <th> Views</th>
- <th> Replies</th>
- <th> User</th>
- {% for question in questions %}
- <tr>
- <td>
- <span href="#" class="category" data-toggle="tooltip" data-placement="top" title="{{ question.category}}">
- {{ question.category|truncatechars:12 }}
- </span>
- <a class="pull-right" href="{% url 'website:filter' question.category %}?qid={{ question.id }}">
- <span class="glyphicon glyphicon-search"></span>
- </a>
- </td>
-
- <td>
- <span class="tutorial" data-toggle="tooltip" data-placement="top" title="{{ question.tutorial}}">
- {{ question.tutorial|truncatechars:12 }}
- </span>
- <a class="pull-right" href="{% url 'website:filter' question.category question.tutorial %}?qid={{ question.id }}">
- <span class="glyphicon glyphicon-search"></span>
- </a>
- </td>
-
- <td>
- <span>
- <a href="{% url 'website:filter' question.category question.tutorial question.minute_range %}?qid={{ question.id }}">
- {{ question.minute_range }}
- </a>
- </span>
- </td>
-
- <td>
- <span>
- <a href="{% url 'website:filter' question.category question.tutorial question.minute_range question.second_range%}?qid={{ question.id }}">
- {{ question.second_range }}
- </a>
- </span>
- </td>
- <td>
- <span class="title" data-toggle="tooltip" data-placement="top" title="{{ question.title }}">
- <a href="{% url 'website:get_question' question.id %}">{{ question.title|truncatechars:40 }}</a>
- </span>
- </td>
-
- <td>
- <span>
- <i>
- {{ question.date_created|date:"d-m-y" }}
- </i>
- </span>
- </td>
-
- <td>
- {{ question.views}}
- </td>
-
- <td>
- {{ question.reply_set.count }}
- </td>
-
- <td>
- <span class="title" data-toggle="tooltip" data-placement="top" title="{{ question.user }}">
- {{ question.user|truncatechars:10 }}
- </span>
- </td>
- </tr>
- {% endfor %}
+{% block content %}
+ <div id="carousel-container">
+ <div class="row">
+ <div class="col-lg-12">
+ <div class="carousel">
+ {% for category in categories %}
+ <div class="item">
+ <div class="thumb">
+ <img data-lazy="{% static "website/images/" %}{{ category }}.jpg" height="75px" width="99px">
+ </div>
+ <div class="descp">
+ <a class="btn btn-block btn-default btn-sm vs" href="{% url 'website:filter' category %}">{{ category }}</a>
+ </div>
+ </div> <!-- /.item -->
+ {% endfor %}
+ </div> <!-- /.carousel -->
+ </div> <!-- /.col -->
+ </div> <!-- /.row -->
+ </div>
-</table>
- {% if total > 25 %}
- <ul class="pagination pull-right">
- {% for i in total|get_range:"0,10" %}
- <li>
- <a href="{% url 'website:home' %}?marker={{ i }}">
- {% if i == marker %}
- <strong>{{ i|div:"10"|inc }}</strong>
- {% else %}
- {{ i|div:"10"|inc }}
- {% endif %}
- </a>
- </li>
- {% endfor %}
- </ul>
- {% endif %}
+ <div id="filter-container">
+ <div class="row">
+ <form class ="" id="filter-form" action="" role="form">
+ <div class="col-lg-6">
+ <h3>Filter questions . . .</h3>
+ <div class="row">
+ <div class="form-group col-lg-10">
+ <select id="filter-select" class="form-control">
+ <option value="-1">Select a FOSS category</option>
+ {% for category in categories %}
+ <option value="{{ category }}">{{ category }}</option>
+ {% endfor %}
+ </select>
+ </div> <!-- /.form-group, .col -->
+ <div class="form-group col-lg-2">
+ <input class="btn btn-primary btn-block" type="submit" value="Go">
+ </div> <!-- /.form-group, .col -->
+ </div>
+ </div> <!-- /.col -->
+ </form>
+ <div class="col-lg-6">
+ <div class="row">
+ <div class="col-lg-6">
+ <h3 align="center"><strong>{% total_question_count %}</strong></h3>
+ <h3 align="center">Questions</h3>
+ </div>
+ <div class="col-lg-6">
+ <h3 align="center"><strong>{% total_answer_count %}</strong></h3>
+ <h3 align="center">Answers</h3>
+ </div>
+ </div>
+ </div>
+ </div> <!-- /.row -->
+ </div> <!-- /#filter-container -->
+ <br>
+ <div class="panel panel-default">
+ <div class="panel-heading">
+ Recent Questions
+ </div>
+ <div class="panel-body">
+ <table class="table table-bordered table-hover">
+ <th> FOSS </th>
+ <th> Tutorial</th>
+ <th> Min </th>
+ <th> Sec </th>
+ <th> Question</th>
+ <th> Date</th>
+ <th> Views</th>
+ <th> Answers</th>
+ <th> User</th>
+ {% for question in questions %}
+ <tr>
+ <td>
+ <span href="#" class="category" data-toggle="tooltip" data-placement="top" title="{{ question.category}}">
+ {{ question.category|truncatechars:12 }}
+ </span>
+ <a class="pull-right" href="{% url 'website:filter' question.category %}?qid={{ question.id }}">
+ <span class="glyphicon glyphicon-search"></span>
+ </a>
+ </td>
+
+ <td>
+ <span class="tutorial" data-toggle="tooltip" data-placement="top" title="{{ question.tutorial}}">
+ {{ question.tutorial|truncatechars:12 }}
+ </span>
+ <a class="pull-right" href="{% url 'website:filter' question.category question.tutorial %}?qid={{ question.id }}">
+ <span class="glyphicon glyphicon-search"></span>
+ </a>
+ </td>
+
+ <td>
+ <span>
+ <a href="{% url 'website:filter' question.category question.tutorial question.minute_range %}?qid={{ question.id }}">
+ {{ question.minute_range }}
+ </a>
+ </span>
+ </td>
+
+ <td>
+ <span>
+ <a href="{% url 'website:filter' question.category question.tutorial question.minute_range question.second_range%}?qid={{ question.id }}">
+ {{ question.second_range }}
+ </a>
+ </span>
+ </td>
+
+ <td>
+ <span class="title" data-toggle="tooltip" data-placement="top" title="{{ question.title }}">
+ <a href="{% url 'website:get_question' question.id %}">{{ question.title|truncatechars:40 }}</a>
+ </span>
+ </td>
+
+ <td>
+ <span>
+ <i>
+ {{ question.date_created|date:"d-m-y" }}
+ </i>
+ </span>
+ </td>
+
+ <td>
+ {{ question.views}}
+ </td>
+
+ <td>
+ {{ question.answer_set.count }}
+ </td>
+
+ <td>
+ <span class="title" data-toggle="tooltip" data-placement="top" title="{{ question.user }}">
+ {{ question.user|truncatechars:10 }}
+ </span>
+ </td>
+ </tr>
+ {% endfor %}
+
+ </table>
+ </div> <!-- /.panel-body -->
+ </div> <!-- /.panel -->
{% endblock %}
{% block javascript %}
<script>
- $('span').tooltip();
+ $(document).ready(function(){
+ $('.carousel').slick({
+ lazyLoad: 'ondemand',
+ dots: false,
+ touchMove: false,
+ draggable: false,
+ slidesToShow: 8,
+ slidesToScroll: 3,
+ speed: 500,
+ {# autoplay: true, #}
+ autoplaySpeed: 1000,
+ });
+
+ $("#filter-form").submit(function(e) {
+ var category = $("#filter-select").val();
+ if(category != -1) {
+ window.location = "/filter/" + category;
+ }
+ e.preventDefault();
+ });
+ });
</script>
<script src="{% static 'website/js/nice-bar.js' %}"></script>
{% endblock %}
diff --git a/static/website/templates/notify.html b/static/website/templates/notify.html
index 7251f1b..a98d21a 100644
--- a/static/website/templates/notify.html
+++ b/static/website/templates/notify.html
@@ -1,6 +1,14 @@
<div class="notification">
- <a href=""><strong>{{ reply.user }}</strong> replies to <strong>{{ question.title }}</strong></a> /
- {{ reply.body|safe }}
+ {% if notification.cid != 0 and notification.aid != 0 %}
+ <small>
+ <a href="">New <strong>Comment</strong> on "{{ question.title }}"</a>
+ </small>
+ {% elif notification.cid == 0 %}
+ <a href="">New <strong>Answer</strong> on "{{ question.title }}"</a>
+ {% endif %}
+
+
+ <!-- <a href=""><strong>{{ answer.user }}</strong> answers to <strong>{{ question.title }}</strong></a> -->
<a class="remove" data-nid="{{ notification.id }}" href="#">
<span class="glyphicon glyphicon-remove-circle"></span>
</a>
diff --git a/static/website/templates/recent-questions.html b/static/website/templates/recent-questions.html
new file mode 100644
index 0000000..e5661c1
--- /dev/null
+++ b/static/website/templates/recent-questions.html
@@ -0,0 +1,106 @@
+{% endblock content %}
+{% extends 'website/templates/base.html' %}
+{% load static %}
+{% block content %}
+{% load count_tags %}
+<h4><u>Recent Questions</u></h4>
+<table class="table table-bordered table-hover">
+ <th> FOSS </th>
+ <th> Tutorial</th>
+ <th> Min </th>
+ <th> Sec </th>
+ <th> Question</th>
+ <th> Date</th>
+ <th> Views</th>
+ <th> Answers</th>
+ <th> User</th>
+ {% for question in questions %}
+ <tr>
+ <td>
+ <span href="#" class="category" data-toggle="tooltip" data-placement="top" title="{{ question.category}}">
+ {{ question.category|truncatechars:12 }}
+ </span>
+ <a class="pull-right" href="{% url 'website:filter' question.category %}?qid={{ question.id }}">
+ <span class="glyphicon glyphicon-search"></span>
+ </a>
+ </td>
+
+ <td>
+ <span class="tutorial" data-toggle="tooltip" data-placement="top" title="{{ question.tutorial}}">
+ {{ question.tutorial|truncatechars:12 }}
+ </span>
+ <a class="pull-right" href="{% url 'website:filter' question.category question.tutorial %}?qid={{ question.id }}">
+ <span class="glyphicon glyphicon-search"></span>
+ </a>
+ </td>
+
+ <td>
+ <span>
+ <a href="{% url 'website:filter' question.category question.tutorial question.minute_range %}?qid={{ question.id }}">
+ {{ question.minute_range }}
+ </a>
+ </span>
+ </td>
+
+ <td>
+ <span>
+ <a href="{% url 'website:filter' question.category question.tutorial question.minute_range question.second_range%}?qid={{ question.id }}">
+ {{ question.second_range }}
+ </a>
+ </span>
+ </td>
+
+ <td>
+ <span class="title" data-toggle="tooltip" data-placement="top" title="{{ question.title }}">
+ <a href="{% url 'website:get_question' question.id %}">{{ question.title|truncatechars:40 }}</a>
+ </span>
+ </td>
+
+<td>
+ <span>
+ <i>
+ {{ question.date_created|date:"d-m-y" }}
+ </i>
+ </span>
+ </td>
+
+ <td>
+ {{ question.views}}
+ </td>
+
+ <td>
+ {{ question.answer_set.count }}
+ </td>
+
+ <td>
+ <span class="title" data-toggle="tooltip" data-placement="top" title="{{ question.user }}">
+ {{ question.user|truncatechars:10 }}
+ </span>
+ </td>
+ </tr>
+ {% endfor %}
+
+</table>
+ {% if total > 25 %}
+ <ul class="pagination pull-right">
+ {% for i in total|get_range:"0,10" %}
+ <li>
+ <a href="{% url 'website:home' %}?marker={{ i }}">
+ {% if i == marker %}
+ <strong>{{ i|div:"10"|inc }}</strong>
+ {% else %}
+ {{ i|div:"10"|inc }}
+ {% endif %}
+ </a>
+ </li>
+ {% endfor %}
+ </ul>
+ {% endif %}
+
+{% endblock %}
+
+{% block javascript %}
+<script>
+ $('span').tooltip();
+</script>
+{% endblock %}
diff --git a/static/website/templates/recent_questions.html b/static/website/templates/recent_questions.html
deleted file mode 100644
index 1a4cc44..0000000
--- a/static/website/templates/recent_questions.html
+++ /dev/null
@@ -1,5 +0,0 @@
-<ul>
-{% for question in recent_questions %}
- <li>{{question.title}}</li>
-{% endfor %}
-</ul>
diff --git a/static/website/templates/user-replies.html b/static/website/templates/user-answers.html
index 8be85fa..34a1c68 100644
--- a/static/website/templates/user-replies.html
+++ b/static/website/templates/user-answers.html
@@ -1,17 +1,17 @@
{% extends 'website/templates/base.html' %}
{% load count_tags %}
{% block content %}
- <h4>My Replies</h4>
- {% for reply in replies%}
- <div class="my-reply">
+ <h4>My Answers</h4>
+ {% for answer in answers%}
+ <div class="my-answer">
<span class="body">
- <a href="{% url 'website:get_question' reply.question.id %}#reply{{ reply.id }}">{{ reply.body|safe }}</a>
+ <a href="{% url 'website:get_question' answer.question.id %}#answer{{ answer.id }}">{{ answer.body|safe }}</a>
</span>
<br>
<span class="date">
<small>
Replied on:
- {{ reply.date_created }}
+ {{ answer.date_created }}
</small>
</span>
</div>
@@ -21,7 +21,7 @@
<ul class="pagination pull-right">
{% for i in total|get_range:"0,10" %}
<li>
- <a href="{% url 'website:user_replies' user.id %}?marker={{ i }}">
+ <a href="{% url 'website:user_answers' user.id %}?marker={{ i }}">
{% if i == marker %}
<strong>{{ i|div:"10"|inc }}</strong>
{% else %}