aboutsummaryrefslogtreecommitdiffstats
path: root/g/fa/docs/assets/js/index/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'g/fa/docs/assets/js/index/index.js')
-rwxr-xr-xg/fa/docs/assets/js/index/index.js25
1 files changed, 25 insertions, 0 deletions
diff --git a/g/fa/docs/assets/js/index/index.js b/g/fa/docs/assets/js/index/index.js
new file mode 100755
index 000000000..0858f0cf6
--- /dev/null
+++ b/g/fa/docs/assets/js/index/index.js
@@ -0,0 +1,25 @@
+$(function() {
+ var MainView = Backbone.View.extend({
+ el: $("div.container"),
+
+ modalTemplate: _.template($("#modal-template").html()),
+
+ events:{
+ "click ul.the-icons > li": "iconClicked"
+ },
+
+ iconClicked: function(event) {
+ event.preventDefault();
+
+ var $item = $(event.currentTarget);
+ var $modal = $(this.modalTemplate({"style": $item.attr("class")}));
+
+ $modal.modal("show");
+ $modal.on('hidden', function () {
+ $modal.remove();
+ })
+ }
+ });
+
+ var mainView = new MainView();
+});