From 6be44695b2713da97d8c7ccac1b47792fcbad409 Mon Sep 17 00:00:00 2001 From: Timo Uhlmann Date: Wed, 30 Jan 2013 20:11:56 +0100 Subject: [PATCH 1/2] Added spine.mobile --- app/assets/javascripts/spine/mobile/panel.js | 1 + app/assets/javascripts/spine/mobile/stage.js | 1 + app/assets/javascripts/spine/mobile/touch.js | 1 + 3 files changed, 3 insertions(+) create mode 100644 app/assets/javascripts/spine/mobile/panel.js create mode 100644 app/assets/javascripts/spine/mobile/stage.js create mode 100644 app/assets/javascripts/spine/mobile/touch.js diff --git a/app/assets/javascripts/spine/mobile/panel.js b/app/assets/javascripts/spine/mobile/panel.js new file mode 100644 index 0000000..0fbb73e --- /dev/null +++ b/app/assets/javascripts/spine/mobile/panel.js @@ -0,0 +1 @@ +You are being redirected. \ No newline at end of file diff --git a/app/assets/javascripts/spine/mobile/stage.js b/app/assets/javascripts/spine/mobile/stage.js new file mode 100644 index 0000000..8f6e456 --- /dev/null +++ b/app/assets/javascripts/spine/mobile/stage.js @@ -0,0 +1 @@ +You are being redirected. \ No newline at end of file diff --git a/app/assets/javascripts/spine/mobile/touch.js b/app/assets/javascripts/spine/mobile/touch.js new file mode 100644 index 0000000..0aff6b8 --- /dev/null +++ b/app/assets/javascripts/spine/mobile/touch.js @@ -0,0 +1 @@ +You are being redirected. \ No newline at end of file From c9da200aa03e93356ab712468a5eaf3ba348eb2f Mon Sep 17 00:00:00 2001 From: Timo Uhlmann Date: Wed, 30 Jan 2013 22:57:37 +0100 Subject: [PATCH 2/2] This time I really added the mobile scripts --- app/assets/javascripts/spine/mobile/panel.js | 133 ++++++++++++++++- app/assets/javascripts/spine/mobile/stage.js | 147 ++++++++++++++++++- app/assets/javascripts/spine/mobile/touch.js | 80 +++++++++- 3 files changed, 357 insertions(+), 3 deletions(-) diff --git a/app/assets/javascripts/spine/mobile/panel.js b/app/assets/javascripts/spine/mobile/panel.js index 0fbb73e..c44067a 100644 --- a/app/assets/javascripts/spine/mobile/panel.js +++ b/app/assets/javascripts/spine/mobile/panel.js @@ -1 +1,132 @@ -You are being redirected. \ No newline at end of file +(function() { + var $, Gfx, Panel, Stage; + var __hasProp = Object.prototype.hasOwnProperty, __extends = function(child, parent) { + for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } + function ctor() { this.constructor = child; } + ctor.prototype = parent.prototype; + child.prototype = new ctor; + child.__super__ = parent.prototype; + return child; + }, __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; + $ = Spine.$; + Gfx = require('gfx'); + Stage = require('./stage'); + Panel = (function() { + __extends(Panel, Stage); + Panel.prototype.title = false; + Panel.prototype.viewport = false; + function Panel() { + var _ref, _ref2; + Panel.__super__.constructor.apply(this, arguments); + this.el.removeClass('stage').addClass('panel'); + this.header.append($('

')); + if (this.title) { + this.setTitle(this.title); + } + if ((_ref = this.stage) == null) { + this.stage = Stage.globalStage(); + } + if ((_ref2 = this.stage) != null) { + _ref2.add(this); + } + } + Panel.prototype.setTitle = function(title) { + if (title == null) { + title = ''; + } + return this.header.find('h2:first').html(title); + }; + Panel.prototype.addButton = function(text, callback) { + var button; + if (typeof callback === 'string') { + callback = this[callback]; + } + button = $('