summaryrefslogtreecommitdiff
path: root/js/frames.js
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2014-01-23 10:10:19 -0500
committerJules Laplace <jules@okfoc.us>2014-01-23 10:10:19 -0500
commit3a51572e8a6628f90e73e2ab0bca52a98d9540e7 (patch)
tree7187b65938780e22d091f5738636cf8b34f1ea3c /js/frames.js
parent9c9a700e268af6e3c6d4ed140d29d56968641dc7 (diff)
more shuffling
Diffstat (limited to 'js/frames.js')
-rw-r--r--js/frames.js32
1 files changed, 32 insertions, 0 deletions
diff --git a/js/frames.js b/js/frames.js
index 0ae256c..c9c844d 100644
--- a/js/frames.js
+++ b/js/frames.js
@@ -1,4 +1,36 @@
+var frame_editor = {}
+
+frame_editor.init = function(){
+ frame_editor.bind()
+}
+
+frame_editor.bind = function(){
+ $("#add-frame").click(add_frame)
+ $("#frames").sortable({
+ start: drag_start,
+ stop: drag_stop
+ });
+ $(document).on("click","#frames .remove",remove_frame)
+ $("#framecount").change(function(){
+ var val = $(this).int()
+ if (val < 1 || isNaN(val)) $(this).val(val = 1)
+ if (val == 1) $("#add-frame").html("+add frame")
+ else $("#add-frame").html("+add frames")
+ })
+
+ $("#frames").disableSelection();
+ $("#remove-all-frames").click(remove_all_frames)
+ $("#weave-frames").click(weave_frames)
+ $("#shuffle-frames").click(shuffle_frames)
+ $("#reverse-frames").click(reverse_frames)
+ $("#sort-frames").click(sort_frames)
+
+ $("#render").click(render)
+ $("#save").click(save)
+ $("#upload").click(upload)
+}
+
function add_frame(){
var frame_count = $("#framecount").int()
if (frame_count < 2) {