From 96d3b84593362eecc2e8f1d5b4f13b7779efcbcd Mon Sep 17 00:00:00 2001 From: Sean Fridman Date: Thu, 9 Apr 2015 12:46:44 -0400 Subject: Update app manifest to use one schema --- site/db.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'site/db.json') diff --git a/site/db.json b/site/db.json index 14f8724..8107c6d 100644 --- a/site/db.json +++ b/site/db.json @@ -1,8 +1,9 @@ { "meta": [], - "retail": [ + "project": [ { "id": "diesel-ss15", + "category": "retail", "title": "DIESEL JOGG JEANS SS15 DENIM CAMPAIGN", "shortname": "DIESEL SS15", "description": "Sed posuere consectetur est at lobortis. Donec id elit non mi porta gravida at eget metus. Cras mattis consectetur purus sit amet fermentum. Vestibulum id ligula porta felis euismod semper. Donec sed odio dui. \r\n\r\nVestibulum id ligula porta felis euismod semper. Vestibulum id ligula porta felis euismod semper. Vestibulum id ligula porta felis euismod semper. Aenean lacinia bibendum nulla sed consectetur. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. \r\n\r\nCurabitur blandit tempus porttitor. Integer posuere erat a ante venenatis dapibus posuere velit aliquet. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec ullamcorper nulla non metus auctor fringilla. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur blandit tempus porttitor. Maecenas sed diam eget risus varius blandit sit amet non magna.", -- cgit v1.2.3-70-g09d2 From 7b7ac014579bafdb16e91a98f995f4fa7f55b4f1 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Thu, 9 Apr 2015 17:17:00 -0400 Subject: alert when deleting posts --- site/db.json | 20 ++++++++++++++++++++ themes/okadmin/public/css/main.css | 5 +++++ themes/okadmin/public/js/app.js | 9 +++++++++ themes/okadmin/templates/resource.liquid | 2 +- 4 files changed, 35 insertions(+), 1 deletion(-) (limited to 'site/db.json') diff --git a/site/db.json b/site/db.json index 8107c6d..07085d4 100644 --- a/site/db.json +++ b/site/db.json @@ -28,6 +28,26 @@ "caption": "CURABITUR BLANDIT TEMPUS PORTTITOR 4" } ] + }, + { + "id": "TEST", + "title": "", + "shortname": "", + "description": "", + "video": { + "url": "", + "type": "", + "token": "", + "title": "", + "thumb": "" + }, + "category": "retail", + "images": [ + { + "uri": "https://ltho.s3.amazonaws.com/cb2698ea-9927-4ca9-972b-f227d46d25f3.png", + "caption": "" + } + ] } ], "advertising": [], diff --git a/themes/okadmin/public/css/main.css b/themes/okadmin/public/css/main.css index d2a4418..ad940e8 100644 --- a/themes/okadmin/public/css/main.css +++ b/themes/okadmin/public/css/main.css @@ -248,10 +248,15 @@ label { li.image-element:hover .remove-image { display: block; } +li.image-element .remove-image:hover { + color: red; +} .remove-image { display: none; } +#delete_form button:hover { color: red } + .template { display: none; } diff --git a/themes/okadmin/public/js/app.js b/themes/okadmin/public/js/app.js index 8c85663..441172f 100644 --- a/themes/okadmin/public/js/app.js +++ b/themes/okadmin/public/js/app.js @@ -59,6 +59,15 @@ var OKAdmin = function(){ }) }) + $("#delete_form").submit(function(e){ + if (confirm("Are you sure you want to delete this record?")) { + return + } + else { + e.preventDefault() + } + }) + function pressEnter(fn){ return function(e){ if (e.keyCode && e.keyCode !== 13) return diff --git a/themes/okadmin/templates/resource.liquid b/themes/okadmin/templates/resource.liquid index 48e3ef2..c321e8a 100644 --- a/themes/okadmin/templates/resource.liquid +++ b/themes/okadmin/templates/resource.liquid @@ -14,7 +14,7 @@
-
+
-- cgit v1.2.3-70-g09d2 From 97bd666d13d5f3466d157f473d91371cd2e4c7ed Mon Sep 17 00:00:00 2001 From: julie lala Date: Thu, 9 Apr 2015 17:18:41 -0400 Subject: test data --- site/db.json | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) (limited to 'site/db.json') diff --git a/site/db.json b/site/db.json index 07085d4..b7ee8a7 100644 --- a/site/db.json +++ b/site/db.json @@ -31,21 +31,25 @@ }, { "id": "TEST", - "title": "", - "shortname": "", + "title": "Testing!", + "shortname": "TEST PROJECT", "description": "", "video": { - "url": "", - "type": "", - "token": "", - "title": "", - "thumb": "" + "url": "https://vimeo.com/19021508", + "type": "vimeo", + "token": "19021508", + "title": "Police Academy 6 - RUN", + "thumb": "http://i.vimeocdn.com/video/120177451_640.jpg" }, - "category": "retail", + "category": "advertising", "images": [ { - "uri": "https://ltho.s3.amazonaws.com/cb2698ea-9927-4ca9-972b-f227d46d25f3.png", - "caption": "" + "uri": "http://hdwallpapersfit.com/wp-content/uploads/2015/02/red-foliage-trees-wallpapers-fall-leaves.jpg", + "caption": "Autumn leaves" + }, + { + "uri": "https://img1.etsystatic.com/000/0/6435290/il_fullxfull.266310309.jpg", + "caption": "More trees, tree thursday" } ] } -- cgit v1.2.3-70-g09d2 From 59cd4002fd8900798444c10afb62f0f82b9a7c1e Mon Sep 17 00:00:00 2001 From: julie lala Date: Thu, 9 Apr 2015 17:21:22 -0400 Subject: rm test data --- site/db.json | 24 ------------------------ 1 file changed, 24 deletions(-) (limited to 'site/db.json') diff --git a/site/db.json b/site/db.json index b7ee8a7..8107c6d 100644 --- a/site/db.json +++ b/site/db.json @@ -28,30 +28,6 @@ "caption": "CURABITUR BLANDIT TEMPUS PORTTITOR 4" } ] - }, - { - "id": "TEST", - "title": "Testing!", - "shortname": "TEST PROJECT", - "description": "", - "video": { - "url": "https://vimeo.com/19021508", - "type": "vimeo", - "token": "19021508", - "title": "Police Academy 6 - RUN", - "thumb": "http://i.vimeocdn.com/video/120177451_640.jpg" - }, - "category": "advertising", - "images": [ - { - "uri": "http://hdwallpapersfit.com/wp-content/uploads/2015/02/red-foliage-trees-wallpapers-fall-leaves.jpg", - "caption": "Autumn leaves" - }, - { - "uri": "https://img1.etsystatic.com/000/0/6435290/il_fullxfull.266310309.jpg", - "caption": "More trees, tree thursday" - } - ] } ], "advertising": [], -- cgit v1.2.3-70-g09d2 From 2b95bcf414f02551a384ef2020958e90431814dd Mon Sep 17 00:00:00 2001 From: Sean Fridman Date: Sat, 11 Apr 2015 02:07:21 -0400 Subject: Update twohustlers DB to include indices --- site/db.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'site/db.json') diff --git a/site/db.json b/site/db.json index 8107c6d..f33647f 100644 --- a/site/db.json +++ b/site/db.json @@ -27,24 +27,24 @@ "uri": "http://twohustlers.com/bigimages/ss15_3.jpg", "caption": "CURABITUR BLANDIT TEMPUS PORTTITOR 4" } - ] + ], + "__index": 1 } ], - "advertising": [], - "experiential": [], - "content": [], "page": [ { "id": "about", "title": "WHO WE ARE", "body": "WE ARE A COLLECTIVE OF DIGITAL NATIVES, INDUSTRY INFLUENCERS, TRENDSETTERS, MILLENNIAL COMMUNICATORS & UNORTHODOX STRATEGISTS – A NEW MEDIA CREATIVE LAB. TOGETHER WE CREATE LIVING, BREATHING, CONTENT DRIVEN EXPERIENCES THAT ENGAGE TODAY’S CONSUMER AUDIENCE. WE ARE WILD, PUNK, PROVOCATIVE, RADICAL, FEARLESS, SUBVERSIVE, BOISTEROUS, ANARCHIC, UNEXPECTED & DISRUPTIVE. MOST OF ALL WE ARE CURIOUS. WELCOME TO THE WORLD OF TWO HUSTLERS.", - "image": "http://www.lansdowneresort.com/meetings/assets/images/masthead/meetings-team-building.jpg" + "image": "http://www.lansdowneresort.com/meetings/assets/images/masthead/meetings-team-building.jpg", + "__index": 1 }, { "id": "contact", "title": "CONTACT", "body": "TWOHUSTLERS\r\n50 WHITE STREET\r\nNEW YORK, NY 10013\r\nINFO@TWOHUSTLERS.COM\r\n+1 646 370-1180\r\nTWOHUSTLERS ©2014\r\nWEBSITE BY OKFOCUS", - "image": "http://checkingintocollege.com/wp/wp-content/uploads/2014/08/angryphone.jpg" + "image": "http://checkingintocollege.com/wp/wp-content/uploads/2014/08/angryphone.jpg", + "__index": 0 } ] -} \ No newline at end of file +} -- cgit v1.2.3-70-g09d2 From 0b6afc1d5aa8a2f33b1c21e04a10c3eaa43870c1 Mon Sep 17 00:00:00 2001 From: julie lala Date: Sat, 11 Apr 2015 11:41:55 -0400 Subject: db --- site/db.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'site/db.json') diff --git a/site/db.json b/site/db.json index 8107c6d..8ee246c 100644 --- a/site/db.json +++ b/site/db.json @@ -43,7 +43,7 @@ { "id": "contact", "title": "CONTACT", - "body": "TWOHUSTLERS\r\n50 WHITE STREET\r\nNEW YORK, NY 10013\r\nINFO@TWOHUSTLERS.COM\r\n+1 646 370-1180\r\nTWOHUSTLERS ©2014\r\nWEBSITE BY OKFOCUS", + "body": "TWOHUSTLERS\r\n50 WHITE STREET\r\nNEW YORK, NY 10013\r\nINFO@TWOHUSTLERS.COM\r\n+1 646 370-1180\r\nTWOHUSTLERS ©2014\r\nWEBSITE BY OKFOCUS", "image": "http://checkingintocollege.com/wp/wp-content/uploads/2014/08/angryphone.jpg" } ] -- cgit v1.2.3-70-g09d2 From edcc3c497f05e14bdd5655a0bc154cee04784a60 Mon Sep 17 00:00:00 2001 From: julie lala Date: Mon, 13 Apr 2015 16:45:38 -0400 Subject: misc --- site/db.json | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'site/db.json') diff --git a/site/db.json b/site/db.json index c07e321..b6fbf24 100644 --- a/site/db.json +++ b/site/db.json @@ -3,7 +3,7 @@ "project": [ { "id": "diesel-ss15", - "category": "retail", + "category": "advertising", "title": "DIESEL JOGG JEANS SS15 DENIM CAMPAIGN", "shortname": "DIESEL SS15", "description": "Sed posuere consectetur est at lobortis. Donec id elit non mi porta gravida at eget metus. Cras mattis consectetur purus sit amet fermentum. Vestibulum id ligula porta felis euismod semper. Donec sed odio dui. \r\n\r\nVestibulum id ligula porta felis euismod semper. Vestibulum id ligula porta felis euismod semper. Vestibulum id ligula porta felis euismod semper. Aenean lacinia bibendum nulla sed consectetur. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. \r\n\r\nCurabitur blandit tempus porttitor. Integer posuere erat a ante venenatis dapibus posuere velit aliquet. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec ullamcorper nulla non metus auctor fringilla. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur blandit tempus porttitor. Maecenas sed diam eget risus varius blandit sit amet non magna.", @@ -26,9 +26,13 @@ { "uri": "http://twohustlers.com/bigimages/ss15_3.jpg", "caption": "CURABITUR BLANDIT TEMPUS PORTTITOR 4" + }, + { + "uri": "https://ltho.s3.amazonaws.com/65e2ee7c-4c44-435a-875e-ef635a7e0106.jpg", + "caption": "weeeezle" } ], - "__index": 1 + "__index": "0" } ], "page": [ @@ -47,4 +51,4 @@ "__index": 0 } ] -} +} \ No newline at end of file -- cgit v1.2.3-70-g09d2 From 34f1ca02bea38e0b7ef185ebf07d3ec6df30f370 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Mon, 13 Apr 2015 17:57:17 -0400 Subject: split up the projects by category, add a schema flag so we can use the same singular template --- app/index.js | 6 ++-- app/node_modules/okquery/index.js | 6 ++++ app/node_modules/okview/index.js | 2 +- site/db.json | 8 +++-- site/index.js | 67 +++++++++++++++++++++------------------ site/templates/index.liquid | 31 ++++++++---------- 6 files changed, 65 insertions(+), 55 deletions(-) (limited to 'site/db.json') diff --git a/app/index.js b/app/index.js index 419adfc..7860f76 100644 --- a/app/index.js +++ b/app/index.js @@ -87,7 +87,6 @@ function OKCMS(options) { this._createResources(resourceConfig, db, schemas); var errorHandler = createErrorHandlerProducer( templateProvider, adminTemplateProvider, debug); - // Create view instances from config var views = this._views = this._createViews(viewConfig, db, meta, resourceCache, templateProvider, @@ -141,7 +140,7 @@ OKCMS.prototype._createResources = function(resourceConfig, db, schemaCache) { var type = config.type; var schema = schemaCache[type]; if (!schema) - throw new Error('Resource config references nonexistent schema'); + throw new Error('Resource config references nonexistent schema ' + type); var resource = OKResource({ type: type, db: db, @@ -244,7 +243,8 @@ OKCMS.prototype._createQueries = function(queryConfig, resourceCache) { var query = config.query || '*'; return new OKQuery({ resource: resource, - query: query + query: query, + as: config.as, }); }); }; diff --git a/app/node_modules/okquery/index.js b/app/node_modules/okquery/index.js index 9cc8b78..519bc08 100644 --- a/app/node_modules/okquery/index.js +++ b/app/node_modules/okquery/index.js @@ -33,6 +33,12 @@ function OKQuery(options) { enumerable: true }); + Object.defineProperty(this, 'as', { + value: options.as, + writable: false, + enumerable: true + }); + this.get = createQuery(resource, query, { default: options.default }); diff --git a/app/node_modules/okview/index.js b/app/node_modules/okview/index.js index 63f22b5..951261c 100644 --- a/app/node_modules/okview/index.js +++ b/app/node_modules/okview/index.js @@ -139,7 +139,7 @@ function fetchTemplateData(meta, queries, id) { return cache; } var resource = queries[i].resource; - var type = queries[i].type; + var type = queries[i].as || queries[i].type; var manyResult = isarray(result); // Inform template of ID in generic field if (manyResult) { diff --git a/site/db.json b/site/db.json index b6fbf24..22833f1 100644 --- a/site/db.json +++ b/site/db.json @@ -1,9 +1,8 @@ { "meta": [], - "project": [ + "retail": [ { "id": "diesel-ss15", - "category": "advertising", "title": "DIESEL JOGG JEANS SS15 DENIM CAMPAIGN", "shortname": "DIESEL SS15", "description": "Sed posuere consectetur est at lobortis. Donec id elit non mi porta gravida at eget metus. Cras mattis consectetur purus sit amet fermentum. Vestibulum id ligula porta felis euismod semper. Donec sed odio dui. \r\n\r\nVestibulum id ligula porta felis euismod semper. Vestibulum id ligula porta felis euismod semper. Vestibulum id ligula porta felis euismod semper. Aenean lacinia bibendum nulla sed consectetur. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. \r\n\r\nCurabitur blandit tempus porttitor. Integer posuere erat a ante venenatis dapibus posuere velit aliquet. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec ullamcorper nulla non metus auctor fringilla. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur blandit tempus porttitor. Maecenas sed diam eget risus varius blandit sit amet non magna.", @@ -50,5 +49,8 @@ "image": "http://checkingintocollege.com/wp/wp-content/uploads/2014/08/angryphone.jpg", "__index": 0 } - ] + ], + "advertising": [], + "experiential": [], + "content": [] } \ No newline at end of file diff --git a/site/index.js b/site/index.js index dace900..8eec697 100644 --- a/site/index.js +++ b/site/index.js @@ -1,5 +1,14 @@ var okcms = require('..'); +var projectSchema = { + id: {type: 'string', id: true}, + title: {type: 'string'}, + shortname: {type: 'string'}, + description: {type: 'text'}, + video: {type: 'video'}, + images: {type: 'captioned-image-list'}, +} + var app = okcms.createApp({ root: 'public', @@ -11,26 +20,19 @@ var app = okcms.createApp({ body: {type: 'text'}, image: {type: 'string'} }, - project: { - id: {type: 'string', id: true}, - title: {type: 'string'}, - shortname: {type: 'string'}, - category: {type: 'enum', options: [ - 'retail', - 'advertising', - 'experiential', - 'content'] - }, - description: {type: 'text'}, - video: {type: 'video'}, - images: {type: 'captioned-image-list'}, - } + retail: projectSchema, + advertising: projectSchema, + experiential: projectSchema, + content: projectSchema, }, resources: [ { type: 'page', static: {id: 'about'}}, { type: 'page', static: {id: 'contact'}}, - { type: 'project' } + { type: 'retail' }, + { type: 'advertising' }, + { type: 'experiential' }, + { type: 'content' } ], services: { @@ -44,8 +46,11 @@ var app = okcms.createApp({ views: { '/': { data: [ - {type: 'project', query: '*'}, - {type: 'page', query: '*'} + {type: 'page', query: '*'}, + {type: 'retail', query: '*'}, + {type: 'advertising', query: '*'}, + {type: 'experiential', query: '*'}, + {type: 'content', query: '*'}, ] }, '/about': { @@ -55,17 +60,19 @@ var app = okcms.createApp({ data: {type: 'page', query: 'contact'} }, '/all': { - data: { - type: 'project', - query: '*' - }, + data: [ + {type: 'retail', query: '*'}, + {type: 'advertising', query: '*'}, + {type: 'experiential', query: '*'}, + {type: 'content', query: '*'}, + ], template: 'all' }, '/retail/:id': { data: { - type: 'project', + type: 'retail', + as: 'project', query: { - category: 'retail', id: ':id' } }, @@ -73,9 +80,8 @@ var app = okcms.createApp({ }, '/advertising/:id': { data: { - type: 'project', + type: 'advertising', query: { - category: 'advertising', id: ':id' } }, @@ -83,9 +89,9 @@ var app = okcms.createApp({ }, '/experiential/:id': { data: { - type: 'project', + type: 'experiential', + as: 'project', query: { - category: 'experiential', id: ':id' } }, @@ -93,12 +99,13 @@ var app = okcms.createApp({ }, '/content/:id': { data: { - type: 'project', + type: 'content', + as: 'project', query: { - category: 'content', id: ':id' } - } + }, + template: 'project' } } diff --git a/site/templates/index.liquid b/site/templates/index.liquid index 954670a..0bd6b7d 100644 --- a/site/templates/index.liquid +++ b/site/templates/index.liquid @@ -85,36 +85,28 @@ WEBSITE BY OKFOCUS, http://okfoc.us, Internet Legends. -
-

EDIT {{ resource.type }} '{{ resource.id }}'

+
+

EDIT {{ resource.type }} '{{ resource.spec.title.value }}'

{% include 'partials/inputs' %} -- cgit v1.2.3-70-g09d2 From 455c09226f1bc57021147e889ef1127e982ed67c Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Mon, 13 Apr 2015 18:52:06 -0400 Subject: rename shortname -> menu to be clear --- site/db.json | 2 +- site/index.js | 2 +- site/templates/all.liquid | 8 ++++---- site/templates/index.liquid | 8 ++++---- themes/okadmin/public/js/app.js | 6 +++--- 5 files changed, 13 insertions(+), 13 deletions(-) (limited to 'site/db.json') diff --git a/site/db.json b/site/db.json index 6c598ab..eb0265d 100644 --- a/site/db.json +++ b/site/db.json @@ -4,7 +4,7 @@ { "id": "diesel-jogg-jeans-ss15-denim-campaign", "title": "DIESEL JOGG JEANS SS15 DENIM CAMPAIGN", - "shortname": "DIESEL SS15", + "menu": "DIESEL SS15", "description": "Sed posuere consectetur est at lobortis. Donec id elit non mi porta gravida at eget metus. Cras mattis consectetur purus sit amet fermentum. Vestibulum id ligula porta felis euismod semper. Donec sed odio dui. \r\n\r\nVestibulum id ligula porta felis euismod semper. Vestibulum id ligula porta felis euismod semper. Vestibulum id ligula porta felis euismod semper. Aenean lacinia bibendum nulla sed consectetur. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. \r\n\r\nCurabitur blandit tempus porttitor. Integer posuere erat a ante venenatis dapibus posuere velit aliquet. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec ullamcorper nulla non metus auctor fringilla. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur blandit tempus porttitor. Maecenas sed diam eget risus varius blandit sit amet non magna.", "video": { "url": "http://vimeo.com/112498725", diff --git a/site/index.js b/site/index.js index d4f5cb4..189dfc4 100644 --- a/site/index.js +++ b/site/index.js @@ -3,7 +3,7 @@ var okcms = require('..'); var projectSchema = { id: {type: 'string', id: true, hidden: true}, title: {type: 'string'}, - shortname: {type: 'string'}, + menu: {type: 'string'}, description: {type: 'text'}, video: {type: 'video'}, images: {type: 'captioned-image-list'}, diff --git a/site/templates/all.liquid b/site/templates/all.liquid index 01ddc3a..e6f39bf 100644 --- a/site/templates/all.liquid +++ b/site/templates/all.liquid @@ -2,25 +2,25 @@ {% for project in retails %}
- {{ project.shortname }} + {{ project.title }}
{% endfor %} {% for project in advertisings %}
- {{ project.shortname }} + {{ project.title }}
{% endfor %} {% for project in experientials %}
- {{ project.shortname }} + {{ project.title }}
{% endfor %} {% for project in contents %}
- {{ project.shortname }} + {{ project.title }}
{% endfor %} diff --git a/site/templates/index.liquid b/site/templates/index.liquid index 19bdf88..19a0b6c 100644 --- a/site/templates/index.liquid +++ b/site/templates/index.liquid @@ -88,25 +88,25 @@ WEBSITE BY OKFOCUS, http://okfoc.us, Internet Legends.
retail
{% for project in retails %} - {{ project.shortname }} + {{ project.menu }} {% endfor %}
advertising
{% for project in advertisings %} - {{ project.shortname }} + {{ project.menu }} {% endfor %}
experiential
{% for project in experientials %} - {{ project.shortname }} + {{ project.menu }} {% endfor %}
content
{% for project in contents %} - {{ project.shortname }} + {{ project.menu }} {% endfor %}
diff --git a/themes/okadmin/public/js/app.js b/themes/okadmin/public/js/app.js index ab571f3..aa8d0ad 100644 --- a/themes/okadmin/public/js/app.js +++ b/themes/okadmin/public/js/app.js @@ -51,7 +51,7 @@ var OKAdmin = function(){ // fix post indexing in list-driven inputs $(".main.resource form").submit(function(e){ - var $id = $("[name=id]"), $title = $("[name=title]"), $shortname = $("[name=shortname]"), $section = $(".resource.main") + var $id = $("[name=id]"), $title = $("[name=title]"), $menu = $("[name=menu]"), $section = $(".resource.main") var id = $section.data("id"), type = $section.data("type") if ($title.length && ! $title.val()) { @@ -61,8 +61,8 @@ var OKAdmin = function(){ return } - if ($shortname.length && ! $shortname.val()) { - $shortname.val( $title.val() ) + if ($menu.length && ! $menu.val()) { + $menu.val( $title.val() ) return } -- cgit v1.2.3-70-g09d2 From db3775794623ebbc63efb44e545b66f2accfd728 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Mon, 13 Apr 2015 19:28:42 -0400 Subject: testing stuff --- site/db.json | 37 ++++++++++++++++++++++++++++++-- site/index.js | 1 + site/templates/project.liquid | 2 +- themes/okadmin/public/js/app.js | 1 - themes/okadmin/templates/resource.liquid | 4 +++- 5 files changed, 40 insertions(+), 5 deletions(-) (limited to 'site/db.json') diff --git a/site/db.json b/site/db.json index eb0265d..7681fd8 100644 --- a/site/db.json +++ b/site/db.json @@ -46,7 +46,40 @@ "__index": "0" } ], - "advertising": [], "experiential": [], - "content": [] + "content": [ + { + "id": "stuff", + "title": "Stuff", + "menu": "Stuff", + "description": "Blablhablhalbhab", + "video": { + "url": "http://vimeo.com/112498725", + "type": "vimeo", + "token": "112498725", + "title": "FW14-2H-VIDEO-V4 2", + "thumb": "http://i.vimeocdn.com/video/497493142_640.jpg" + }, + "images": [ + { + "uri": "https://ltho.s3.amazonaws.com/aa5ab62c-a7f4-433e-8957-c059199de924.png", + "caption": "WHO" + }, + { + "uri": "https://ltho.s3.amazonaws.com/888c06f0-32f4-4f7b-938f-fb9bf178a1dc.png", + "caption": "DARK" + }, + { + "uri": "https://ltho.s3.amazonaws.com/525cd121-a436-472f-b201-7b2baffa804a.png", + "caption": "STUFF" + }, + { + "uri": "https://ltho.s3.amazonaws.com/b2a607e6-1c60-42cd-8449-55737501ff9e.png", + "caption": "BLAH" + } + ], + "__index": "0" + } + ], + "advertising": [] } \ No newline at end of file diff --git a/site/index.js b/site/index.js index 189dfc4..b6dea48 100644 --- a/site/index.js +++ b/site/index.js @@ -81,6 +81,7 @@ var app = okcms.createApp({ '/advertising/:id': { data: { type: 'advertising', + as: 'project', query: { id: ':id' } diff --git a/site/templates/project.liquid b/site/templates/project.liquid index d21fed2..e087049 100644 --- a/site/templates/project.liquid +++ b/site/templates/project.liquid @@ -3,7 +3,7 @@ {{project.title}} + - -
-
-- cgit v1.2.3-70-g09d2 From 0f625b3e6b511f4ee1323da30e6280f4880955fc Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Thu, 16 Apr 2015 12:38:31 -0400 Subject: get rid of contact image --- site/db.json | 2 +- site/public/assets/images/2H_LOGOMARK.svg | 12 ++++++------ site/public/assets/style.css | 4 ++++ site/templates/index.liquid | 6 +++--- site/templates/page.liquid | 14 ++++++++++---- 5 files changed, 24 insertions(+), 14 deletions(-) (limited to 'site/db.json') diff --git a/site/db.json b/site/db.json index f8431f0..d0624e8 100644 --- a/site/db.json +++ b/site/db.json @@ -42,7 +42,7 @@ "id": "contact", "title": "CONTACT", "body": "TWOHUSTLERS\r\n50 WHITE STREET\r\nNEW YORK, NY 10013\r\nINFO@TWOHUSTLERS.COM\r\n+1 646 370-1180\r\nTWOHUSTLERS ©2014\r\nWEBSITE BY OKFOCUS", - "image": "http://checkingintocollege.com/wp/wp-content/uploads/2014/08/angryphone.jpg", + "image": "", "__index": "0" } ], diff --git a/site/public/assets/images/2H_LOGOMARK.svg b/site/public/assets/images/2H_LOGOMARK.svg index 9af234a..43a9691 100644 --- a/site/public/assets/images/2H_LOGOMARK.svg +++ b/site/public/assets/images/2H_LOGOMARK.svg @@ -7,11 +7,11 @@ - - + - - + - -
+ viewBox="338.1 276.3 660.5 819.7" xml:space="preserve"> - + @@ -176,7 +176,7 @@ WEBSITE BY OKFOCUS, http://okfoc.us, Internet Legends. c0,1-0.1,1.8-0.3,2.7c-0.1,0.8-0.1,1.7-0.3,2.5c0,0.3,0,0.6-0.1,0.8c-4,29.5-20.9,56.4-58.2,93.1l-81.8,80.1 c-53.5,52.1-85.9,103.9-101.6,162.9c-6.7,25.1-13.7,52.6-14.5,81L712.3,705.6z"/> - + diff --git a/site/templates/page.liquid b/site/templates/page.liquid index 52b64dc..7c295ff 100644 --- a/site/templates/page.liquid +++ b/site/templates/page.liquid @@ -1,9 +1,15 @@
{{page.title}} - -
- {{page.body | newline_to_br}} -
+ {% if page.image %} + +
+ {{page.body | newline_to_br}} +
+ {% else %} +
+ {{page.body | newline_to_br}} +
+ {% endif %}
-- cgit v1.2.3-70-g09d2 From b51455df828fde90edbee3143bd8d49b00cc3f1a Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Thu, 16 Apr 2015 14:04:10 -0400 Subject: single image upload field, abstract upload class a bit --- site/db.json | 6 +- site/index.js | 1 + site/public/assets/style.css | 3 +- site/templates/index.liquid | 2 + themes/okadmin/public/css/main.css | 25 +++++-- themes/okadmin/public/js/app.js | 93 +++++++++++++++++-------- themes/okadmin/public/js/upload.js | 91 +++++++++++------------- themes/okadmin/templates/partials/inputs.liquid | 52 +++++++++----- 8 files changed, 171 insertions(+), 102 deletions(-) (limited to 'site/db.json') diff --git a/site/db.json b/site/db.json index d0624e8..12ccb38 100644 --- a/site/db.json +++ b/site/db.json @@ -27,7 +27,11 @@ "caption": "CURABITUR BLANDIT TEMPUS PORTTITOR 4" } ], - "__index": "0" + "__index": "0", + "shape": { + "uri": "", + "caption": "" + } } ], "page": [ diff --git a/site/index.js b/site/index.js index 521b7d7..30e4a76 100644 --- a/site/index.js +++ b/site/index.js @@ -7,6 +7,7 @@ var projectSchema = { description: {type: 'text'}, video: {type: 'video'}, images: {type: 'captioned-image-list'}, + shape: {type: 'image'}, } var app = okcms.createApp({ diff --git a/site/public/assets/style.css b/site/public/assets/style.css index 3c2526b..28d0013 100644 --- a/site/public/assets/style.css +++ b/site/public/assets/style.css @@ -285,6 +285,7 @@ nav .middle { } nav .bottom { + height: 20%; width: 100%; background: #bbb; } @@ -489,7 +490,7 @@ nav .sub.active a { } .entry span div.content.noline { border-top: 0; - padding-top: 0px; + padding-top: 0; } .entry span div.content div { width:50%; diff --git a/site/templates/index.liquid b/site/templates/index.liquid index afb5de3..d18098c 100644 --- a/site/templates/index.liquid +++ b/site/templates/index.liquid @@ -110,9 +110,11 @@ WEBSITE BY OKFOCUS, http://okfoc.us, Internet Legends. {% endfor %}
+
ABOUT
CONTACT
diff --git a/themes/okadmin/public/css/main.css b/themes/okadmin/public/css/main.css index ec426f9..685e368 100644 --- a/themes/okadmin/public/css/main.css +++ b/themes/okadmin/public/css/main.css @@ -228,7 +228,9 @@ button, input[type=submit] { border: 0; display: none; } -.main.resource form .group.loaded input:first-child, +.main.resource form .group.image input, +.main.resource form .group.video input:first-child, +.main.resource form .group.loaded.video input[type=text], .main.resource form .group input:first-child { display: block; width: 25em; @@ -238,17 +240,24 @@ button, input[type=submit] { } .main.resource form .group.loaded input { display: block; - width: 20.05em; } -.main.resource form .group input { - display: none; +.main.resource form .group input[type=text] { + width: 20.05em; margin-bottom: 0.1em; } +.main.resource form .group.image .image-element, +.main.resource form .group.video input[type=text], .main.resource form .group.loaded input[hidden], +.main.resource form .group.image.loaded .fields, .main.resource form input[hidden] { display: none; } - +.main.resource form .group.image.loaded .image-element { + display: block; +} +.main.resource form .fields { + height: 3em; +} .main.resource form textarea { padding: 0.5em; height: 15em; @@ -280,6 +289,8 @@ button, input[type=submit] { width: 10em; max-height: 10em; border: 0; +} +.main.resource form .images img { cursor: -webkit-grab; cursor: grab; } @@ -313,10 +324,10 @@ button, input[type=submit] { margin: 0; padding: 0; cursor: pointer; } -li.image-element:hover .remove-image { +.image-element:hover .remove-image { display: block; } -li.image-element .remove-image:hover { +.image-element .remove-image:hover { color: red; } .remove-image { diff --git a/themes/okadmin/public/js/app.js b/themes/okadmin/public/js/app.js index 22317f3..baa4873 100644 --- a/themes/okadmin/public/js/app.js +++ b/themes/okadmin/public/js/app.js @@ -1,38 +1,75 @@ var OKAdmin = function(){ - // initialize our (single) ajax image uploader with an element and a template - OKUpload.bind( document.getElementById("file") ) - OKUpload.add = function(data){ - var url = data[0].extra.Location - add_image(url) - } - - // also handle straight image urls - $("#add-image-url").keydown(pressEnter(function(e){ - var url = $(this).val() - $(this).val("") - add_image(url) - })) + // initialize our multi-image uploader with an element and a template + $(".image-list").each(function(){ + var uploader = new OKUpload () + uploader.bind( $(".add-image-button input", this) ) + uploader.add = function(data){ + var url = data[0].extra.Location + add_image(url) + } + // also handle straight image urls + $(".add-image-url", this).keydown(pressEnter(function(e){ + var url = $(this).val() + $(this).val("") + add_image(url) + })) + + // clone and populate template + function add_image(url){ + var imageTemplate = $("#captioned-image-template").html() + var $el = $(imageTemplate) + $el.find(".uri").val(url) + $el.find("img").attr("src", url) + $(".captioned-image-list ol").append($el) + } + }) + // delete image from gallery + $(document).on("mousedown", ".image-list .remove-image", function(){ + if (confirm("Delete this image?")) { + $(this).parent().remove() + } + }) - // clone and populate template - function add_image(url){ - var imageTemplate = $("#captioned-image-template").html() - var $el = $(imageTemplate) - $el.find(".uri").val(url) - $el.find("img").attr("src", url) - $(".captioned-image-list ol").append($el) - } + // initialize our single image uploader with existing DOM + $(".image").each(function(){ + var $el = $(this) + + var uploader = new OKUpload () + uploader.bind( $(".add-image-button input", this) ) + uploader.add = function(data){ + var url = data[0].extra.Location + add_image(url) + } + // also handle straight image urls + $(".add-image-url", this).keydown(pressEnter(function(e){ + var url = $(this).val() + $(this).val("") + add_image(url) + })) + + // clone and populate template + function add_image(url){ + $el.find(".uri").val(url) + $el.find(".caption").val("") + $el.find("img").attr("src", url) + $el.addClass("loaded") + } + }) + // delete image from single image entry + $(document).on("mousedown", ".image .remove-image", function(){ + if (confirm("Delete this image?")) { + var $el = $(this).closest(".image") + $el.removeClass('loaded') + $el.find(".uri").val("") + $el.find(".caption").val("") + $el.find("img").attr("src", "") + } + }) // make the region sortable with drag-and-drop $(".captioned-image-list ol").sortable() $(".captioned-image-list ol").disableSelection() - - // delete image - $(document).on("mousedown", ".remove-image", function(){ - if (confirm("Delete this image?")) { - $(this).parent().remove() - } - }) // populate a video field with info from our url parser var last_url diff --git a/themes/okadmin/public/js/upload.js b/themes/okadmin/public/js/upload.js index 1c9094c..39f7427 100644 --- a/themes/okadmin/public/js/upload.js +++ b/themes/okadmin/public/js/upload.js @@ -1,55 +1,48 @@ -var OKUpload = { - action: "/_services/image", - - bind: function(el){ - if (! el) return - el.addEventListener("change", OKUpload.handleFileSelect) - }, - - handleFileSelect: function(e) { - e.stopPropagation(); - e.preventDefault(); - - var files = e.dataTransfer ? e.dataTransfer.files : e.target.files; - - for (var i = 0, f; f = files[i]; i++) { - if ( ! f.type.match('image.*')) { - continue; - } - OKUpload.upload(f) - } - }, +var OKUpload = function(){ + this.action = "/_services/image" +} +OKUpload.prototype.bind = function(el){ + if (el.length) el = el[0] + el.addEventListener("change", this.handleFileSelect.bind(this)) +} +OKUpload.prototype.handleFileSelect = function(e) { + e.stopPropagation(); + e.preventDefault(); - upload: function(f){ - var fd = new FormData() - fd.append('image', f) + var files = e.dataTransfer ? e.dataTransfer.files : e.target.files; - var request = $.ajax({ - url: OKUpload.action, - type: "post", - data: fd, - dataType: "json", - processData: false, - contentType: false, - }) - request.done(OKUpload.success) - }, - - success: function(media){ - if (media.error) { - console.log(media.error) - return + for (var i = 0, f; f = files[i]; i++) { + if ( ! f.type.match('image.*')) { + continue; } - OKUpload.add(media) - }, - - add: function(media){ - console.log(media) - }, - - error: function(error){ - throw error - }, + this.upload(f) + } +} +OKUpload.prototype.upload = function(f){ + var fd = new FormData() + fd.append('image', f) + var request = $.ajax({ + url: this.action, + type: "post", + data: fd, + dataType: "json", + processData: false, + contentType: false, + }) + request.done(this.success.bind(this)) +} +OKUpload.prototype.success = function(media){ + if (media.error) { + console.log(media.error) + return + } + this.add(media) +} +OKUpload.prototype.add = function(media){ + console.log(media) +} +OKUpload.prototype.error = function(error){ + throw error } diff --git a/themes/okadmin/templates/partials/inputs.liquid b/themes/okadmin/templates/partials/inputs.liquid index 253b275..c9a4d92 100644 --- a/themes/okadmin/templates/partials/inputs.liquid +++ b/themes/okadmin/templates/partials/inputs.liquid @@ -22,15 +22,48 @@ {% elsif type == 'video' %}
- - + +
+ {% elsif type == 'image' %} +
+
+
+ + +
+ +
+
+ + + {{spec.value.caption}} + +
+
{% elsif type == 'captioned-image-list' %} -
+
+
+
+ + +
+ +
+ + +
    {% for image in spec.value %}
  1. @@ -41,19 +74,6 @@
  2. {% endfor %}
-
- - -
- -
{% elsif type == 'meta' %} -- cgit v1.2.3-70-g09d2 From 48923c16e00892fac916a83c8fdccca63800615f Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Thu, 16 Apr 2015 14:41:58 -0400 Subject: load shape images from posts --- site/db.json | 2 +- site/public/assets/javascripts/_env.js | 20 ++++++++++++-------- site/templates/index.liquid | 17 ++++++++--------- themes/okadmin/public/js/app.js | 10 ++++++---- themes/okadmin/public/js/upload.js | 4 ++-- 5 files changed, 29 insertions(+), 24 deletions(-) (limited to 'site/db.json') diff --git a/site/db.json b/site/db.json index 12ccb38..f1721a6 100644 --- a/site/db.json +++ b/site/db.json @@ -29,7 +29,7 @@ ], "__index": "0", "shape": { - "uri": "", + "uri": "http://okfocus.s3.amazonaws.com/2h/13.gif", "caption": "" } } diff --git a/site/public/assets/javascripts/_env.js b/site/public/assets/javascripts/_env.js index c4e9ace..b567a3d 100644 --- a/site/public/assets/javascripts/_env.js +++ b/site/public/assets/javascripts/_env.js @@ -7,8 +7,11 @@ environment.init = function(){ $("#scene").addClass("fade") var loader = new Loader(environment.ready, new HustleLoader) var preloadImages = $("#preload-image-list").html().split("\n").filter(function(s){ return !!s }) - boxImages = $("#box-image-list").html().split("\n").filter(function(s){ return !!s }) - loader.preloadImages( preloadImages.concat(boxImages) ) + boxImages = $("#box-image-list").html().split("\n") + var postImages = $(".sub a").toArray().map(function(el){ return $(el).data("image") }) + + var images = preloadImages.concat(postImages).concat(boxImages).filter(function(s){ return !!s }) + loader.preloadImages( images ) loader.ready() } environment.ready = function(){ @@ -191,7 +194,7 @@ function build_scene () { controls.zoom(1000) strips.push( new Strip({ - images: boxImages.slice(0, 5), + images: $(".sub[data-type=advertising] a"), x: -100, y: 100, rotationY: PI/4, @@ -199,7 +202,7 @@ function build_scene () { }) ) strips.push( new Strip({ - images: boxImages.slice(5, 10), + images: $(".sub[data-type=retail] a"), x: 100, y: 100, rotationX: PI/4, @@ -208,7 +211,7 @@ function build_scene () { }) ) strips.push( new Strip({ - images: boxImages.slice(10, 15), + images: $(".sub[data-type=experiential] a"), x: 0, y: 100, z: 100, @@ -217,7 +220,7 @@ function build_scene () { }) ) strips.push( new Strip({ - images: boxImages.slice(15, 20), + images: $(".sub[data-type=content] a"), x: 0, y: 100, z: -50, @@ -455,9 +458,10 @@ var Strip = function( opt ){ root.addTo(scene) var prev = root - this.els = opt.images.map(function(url, i){ + this.els = opt.images.toArray().map(function(el, i){ + var data = $(el).data() var el = new MX.Image({ - src: url, + src: data.image, onload: function(img){ } }) diff --git a/site/templates/index.liquid b/site/templates/index.liquid index 224803a..db6bf20 100644 --- a/site/templates/index.liquid +++ b/site/templates/index.liquid @@ -86,27 +86,27 @@ WEBSITE BY OKFOCUS, http://okfoc.us, Internet Legends.
retail
-
+
{% for project in retails %} - {{ project.menu }} + {{ project.menu }} {% endfor %}
advertising
-
+
{% for project in advertisings %} - {{ project.menu }} + {{ project.menu }} {% endfor %}
experiential
-
+
{% for project in experientials %} - {{ project.menu }} + {{ project.menu }} {% endfor %}
content
-
+
{% for project in contents %} - {{ project.menu }} + {{ project.menu }} {% endfor %}
@@ -238,7 +238,6 @@ WEBSITE BY OKFOCUS, http://okfoc.us, Internet Legends. @@ -123,7 +134,7 @@ {{image.caption}} - + {% endfor %} -- cgit v1.2.3-70-g09d2 From 934a8ac8afdaa2afc2061542abbf3f4864a476b1 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Mon, 27 Apr 2015 17:02:55 -0400 Subject: prev/next buttons --- site/db.json | 4 ++-- site/index.js | 2 +- site/public/assets/javascripts/_env.js | 8 +++----- site/public/assets/style.css | 1 + site/templates/project.liquid | 11 ++++++----- 5 files changed, 13 insertions(+), 13 deletions(-) (limited to 'site/db.json') diff --git a/site/db.json b/site/db.json index c391558..66d905f 100644 --- a/site/db.json +++ b/site/db.json @@ -16,7 +16,7 @@ "title": "", "thumb": "" }, - "images": [ + "media": [ { "type": "vimeo", "token": "112498725", @@ -74,7 +74,7 @@ "title": "", "thumb": "" }, - "images": [ + "media": [ { "uri": "https://ltho.s3.amazonaws.com/twohustlers%2Fefd9dcf8-03c1-42c3-b6cc-3472acf908e4.jpg", "caption": "" diff --git a/site/index.js b/site/index.js index a7b207a..3434742 100644 --- a/site/index.js +++ b/site/index.js @@ -5,7 +5,7 @@ var projectSchema = { title: {type: 'string'}, menu: {type: 'string'}, description: {type: 'text'}, - images: {type: 'media-list'}, + media: {type: 'media-list'}, thumbnail: {type: 'image'}, } diff --git a/site/public/assets/javascripts/_env.js b/site/public/assets/javascripts/_env.js index 8c1270f..aae60b9 100644 --- a/site/public/assets/javascripts/_env.js +++ b/site/public/assets/javascripts/_env.js @@ -446,16 +446,14 @@ function build_gallery () { // load_video($el) } else { - next() + gallery.next() } }) - // $next.on("click", next) - function next(){ - gallery.next() - } gallery.loader.on("progress", function(imagesLoaded, loadingImage){ $(loadingImage.img).addClass('loaded') }) + $(".nextbutton").click(function(){ gallery.next() }) + $(".prevbutton").click(function(){ gallery.previous() }) } function resize_gallery () { if (! gallery) return; diff --git a/site/public/assets/style.css b/site/public/assets/style.css index 9fb1a3a..8c7594d 100644 --- a/site/public/assets/style.css +++ b/site/public/assets/style.css @@ -446,6 +446,7 @@ nav .sub.active a { padding: 20px 0px 0.6em 2px; margin-bottom: 0.7em; font-size: 1em; + text-transform: uppercase; } diff --git a/site/templates/project.liquid b/site/templates/project.liquid index 3d32c0d..0dc828c 100644 --- a/site/templates/project.liquid +++ b/site/templates/project.liquid @@ -6,11 +6,12 @@ NEXT ASSET
-- cgit v1.2.3-70-g09d2 From c78f208f3e6bd1199f0d6c88d2431609b58bd303 Mon Sep 17 00:00:00 2001 From: julie lala Date: Mon, 27 Apr 2015 17:06:34 -0400 Subject: changes --- site/db.json | 62 +++++++++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 47 insertions(+), 15 deletions(-) (limited to 'site/db.json') diff --git a/site/db.json b/site/db.json index bf68d79..1ada83f 100644 --- a/site/db.json +++ b/site/db.json @@ -5,9 +5,9 @@ "content": [], "advertising": [ { - "id": "diesel-s-s-2015", - "title": "Diesel S/S 2015", - "menu": "Diesel Spring/Summer 2015", + "id": "diesel-spring-summer-2015", + "title": "Diesel Spring/Summer 2015", + "menu": "Diesel S/S 2015", "description": "FOR SPRING 2015, FORMICHETTI ESTABLISHES THE KEY PIECES THAT HAVE COME TO REFLECT DIESEL’S NEW ERA AND CHARACTERIZE ITS DNA, AND THE FACES WHO BEST REFLECT THE PAST, PRESENT, AND FUTURE OF THE BRAND. IN A REVOLUTIONARY CAMPAIGN BY NICK KNIGHT, FORMICHETTI HIGHLIGHTS HIS PERSONAL HEROES, WHICH INCLUDE NEW FACES AND THE ARTISTS, INNOVATORS, MUSES, AND FRIENDS WHO INSPIRE HIM, AS WELL AS A FEW HEROES FROM PAST CAMPAIGNS. COMBINING CLASSIC PORTRAITURE WITH FUTURISTIC, DIGITAL ELEMENTS, THE CAMPAIGN WILL JUXTAPOSE THE INDIVIDUALS WHO MAKE UP DIESEL’SCOMMUNITY WITH THE “HERO” PIECES THAT BEST DEFINE THE STATEMENT OF THE BRAND TODAY.", "video": { "url": "", @@ -18,19 +18,19 @@ }, "images": [ { - "uri": "https://ltho.s3.amazonaws.com/twohustlers%2F1b55cd3c-eb7d-4ed6-bfe9-2bc53960987d.jpg", + "uri": "https://ltho.s3.amazonaws.com/twohustlers%2Fe22fd077-ca52-42a1-ab9c-e0508bf4408e.jpg", "caption": "" }, { - "uri": "https://ltho.s3.amazonaws.com/twohustlers%2F86a3edfe-bdbb-44ac-9e50-e167c16c89b9.jpg", + "uri": "https://ltho.s3.amazonaws.com/twohustlers%2F1afaa719-c18f-4155-a42f-3e7fc10247c3.jpg", "caption": "" }, { - "uri": "https://ltho.s3.amazonaws.com/twohustlers%2F1afaa719-c18f-4155-a42f-3e7fc10247c3.jpg", + "uri": "https://ltho.s3.amazonaws.com/twohustlers%2F1b55cd3c-eb7d-4ed6-bfe9-2bc53960987d.jpg", "caption": "" }, { - "uri": "https://ltho.s3.amazonaws.com/twohustlers%2F38cb4454-34a4-44af-8243-53da4d2b7c47.jpg", + "uri": "https://ltho.s3.amazonaws.com/twohustlers%2Fe402bfbb-b101-4b42-afcb-818f7b616db9.jpg", "caption": "" }, { @@ -38,15 +38,15 @@ "caption": "" }, { - "uri": "https://ltho.s3.amazonaws.com/twohustlers%2F5bdc8f95-b18f-407a-b2f3-33df1025bf8a.jpg", + "uri": "https://ltho.s3.amazonaws.com/twohustlers%2F38cb4454-34a4-44af-8243-53da4d2b7c47.jpg", "caption": "" }, { - "uri": "https://ltho.s3.amazonaws.com/twohustlers%2Fe22fd077-ca52-42a1-ab9c-e0508bf4408e.jpg", + "uri": "https://ltho.s3.amazonaws.com/twohustlers%2F86a3edfe-bdbb-44ac-9e50-e167c16c89b9.jpg", "caption": "" }, { - "uri": "https://ltho.s3.amazonaws.com/twohustlers%2Fe402bfbb-b101-4b42-afcb-818f7b616db9.jpg", + "uri": "https://ltho.s3.amazonaws.com/twohustlers%2F5bdc8f95-b18f-407a-b2f3-33df1025bf8a.jpg", "caption": "" } ], @@ -57,9 +57,9 @@ "__index": "0" }, { - "id": "diesel-f-w-14", - "title": "Diesel F/W 14", - "menu": "Diesel Fall/Winter 2014", + "id": "diesel-fall-winter-2014", + "title": "Diesel Fall/Winter 2014", + "menu": "Diesel F/W 2014", "description": "FOR FALL/WINTER 2014, IN AN ACT OF DEFIANT ANONYMITY, DIESEL IS STRIPPING AWAY THE IDENTITIES OF ITS MODELS AND CAMPAIGN STARS, DEMOCRATIZING THE CONCEPT – THERE IS NO SINGULAR IDEA OF WHO THE DIESEL PERSON SHOULD BE. SHOT BY NICK KNIGHT, THE CREATIVE IS INSPIRED BY THE THEME “PICASSO MEETS AVEDON,” REPRESENTING THE NEXT DIMENSION OF DIESEL, INTRODUCING THE SECOND PHASE OF THE BRAND AFTER #DIESELREBOOT.", "video": { "url": "", @@ -70,12 +70,44 @@ }, "images": [ { - "uri": "https://ltho.s3.amazonaws.com/twohustlers%2Fefd9dcf8-03c1-42c3-b6cc-3472acf908e4.jpg", + "uri": "https://ltho.s3.amazonaws.com/twohustlers%2F38ea6ad0-f689-491f-857a-12d4fa0d4748.jpg", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/twohustlers%2F12184bdd-0aff-43db-882c-8efcb1e583de.jpg", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/twohustlers%2Fb61bd44f-d074-4a20-a641-fc11957e8cd5.jpg", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/twohustlers%2F2a0b26ae-cc35-406e-923b-e60409e53eb8.jpg", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/twohustlers%2Fd2a68db8-018b-4fdf-8f69-c2e4d0aff76a.jpg", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/twohustlers%2F0b24ebbd-07e8-446e-83db-60484f0f3dd9.jpg", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/twohustlers%2F1f8c6b75-c694-4d31-a790-b042b75b3606.jpg", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/twohustlers%2F907a0fbd-1455-4f3d-b28e-ebcba658f2d3.jpg", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/twohustlers%2F17ee7deb-dee5-497a-a8a6-dfe3f9c3105d.jpg", "caption": "" } ], "thumbnail": { - "uri": "", + "uri": "https://ltho.s3.amazonaws.com/twohustlers%2F94c3bb9d-7d11-43f7-be86-5348a677845f.jpg", "caption": "" }, "__index": "1" -- cgit v1.2.3-70-g09d2 From 21dfb9327f8acb95a5e81c4261fc00392b67e8c6 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Mon, 27 Apr 2015 17:46:49 -0400 Subject: fix flickity version --- site/db.json | 70 +++---- site/public/assets/javascripts/_env.js | 3 +- .../assets/javascripts/vendor/flickity.pkgd.js | 215 +++++++++++---------- themes/okadmin/public/js/app.js | 1 - 4 files changed, 139 insertions(+), 150 deletions(-) (limited to 'site/db.json') diff --git a/site/db.json b/site/db.json index 591706f..3d55602 100644 --- a/site/db.json +++ b/site/db.json @@ -5,9 +5,9 @@ "content": [], "advertising": [ { - "id": "diesel-spring-summer-2015", - "title": "Diesel Spring/Summer 2015", - "menu": "Diesel S/S 2015", + "id": "diesel-s-s-2015", + "title": "Diesel S/S 2015", + "menu": "Diesel Spring/Summer 2015", "description": "FOR SPRING 2015, FORMICHETTI ESTABLISHES THE KEY PIECES THAT HAVE COME TO REFLECT DIESEL’S NEW ERA AND CHARACTERIZE ITS DNA, AND THE FACES WHO BEST REFLECT THE PAST, PRESENT, AND FUTURE OF THE BRAND. IN A REVOLUTIONARY CAMPAIGN BY NICK KNIGHT, FORMICHETTI HIGHLIGHTS HIS PERSONAL HEROES, WHICH INCLUDE NEW FACES AND THE ARTISTS, INNOVATORS, MUSES, AND FRIENDS WHO INSPIRE HIM, AS WELL AS A FEW HEROES FROM PAST CAMPAIGNS. COMBINING CLASSIC PORTRAITURE WITH FUTURISTIC, DIGITAL ELEMENTS, THE CAMPAIGN WILL JUXTAPOSE THE INDIVIDUALS WHO MAKE UP DIESEL’SCOMMUNITY WITH THE “HERO” PIECES THAT BEST DEFINE THE STATEMENT OF THE BRAND TODAY.", "video": { "url": "", @@ -24,19 +24,25 @@ "thumb": "http://i.vimeocdn.com/video/497493142_640.jpg" }, { - "uri": "https://ltho.s3.amazonaws.com/twohustlers%2Fe22fd077-ca52-42a1-ab9c-e0508bf4408e.jpg", + "uri": "https://ltho.s3.amazonaws.com/twohustlers%2F1b55cd3c-eb7d-4ed6-bfe9-2bc53960987d.jpg", "caption": "" }, { - "uri": "https://ltho.s3.amazonaws.com/twohustlers%2F1afaa719-c18f-4155-a42f-3e7fc10247c3.jpg", + "type": "vimeo", + "token": "125927621", + "title": "the Vampyre of Time and Memory", + "thumb": "http://i.vimeocdn.com/video/516197938_640.jpg" + }, + { + "uri": "https://ltho.s3.amazonaws.com/twohustlers%2F86a3edfe-bdbb-44ac-9e50-e167c16c89b9.jpg", "caption": "" }, { - "uri": "https://ltho.s3.amazonaws.com/twohustlers%2F1b55cd3c-eb7d-4ed6-bfe9-2bc53960987d.jpg", + "uri": "https://ltho.s3.amazonaws.com/twohustlers%2F1afaa719-c18f-4155-a42f-3e7fc10247c3.jpg", "caption": "" }, { - "uri": "https://ltho.s3.amazonaws.com/twohustlers%2Fe402bfbb-b101-4b42-afcb-818f7b616db9.jpg", + "uri": "https://ltho.s3.amazonaws.com/twohustlers%2F38cb4454-34a4-44af-8243-53da4d2b7c47.jpg", "caption": "" }, { @@ -44,28 +50,28 @@ "caption": "" }, { - "uri": "https://ltho.s3.amazonaws.com/twohustlers%2F38cb4454-34a4-44af-8243-53da4d2b7c47.jpg", + "uri": "https://ltho.s3.amazonaws.com/twohustlers%2F5bdc8f95-b18f-407a-b2f3-33df1025bf8a.jpg", "caption": "" }, { - "uri": "https://ltho.s3.amazonaws.com/twohustlers%2F86a3edfe-bdbb-44ac-9e50-e167c16c89b9.jpg", + "uri": "https://ltho.s3.amazonaws.com/twohustlers%2Fe22fd077-ca52-42a1-ab9c-e0508bf4408e.jpg", "caption": "" }, { - "uri": "https://ltho.s3.amazonaws.com/twohustlers%2F5bdc8f95-b18f-407a-b2f3-33df1025bf8a.jpg", + "uri": "https://ltho.s3.amazonaws.com/twohustlers%2Fe402bfbb-b101-4b42-afcb-818f7b616db9.jpg", "caption": "" } ], "thumbnail": { - "uri": "", + "uri": "https://ltho.s3.amazonaws.com/twohustlers%2F479667e9-a89d-4c19-935a-b78f3aaf64e6.jpg", "caption": "" }, "__index": "0" }, { - "id": "diesel-fall-winter-2014", - "title": "Diesel Fall/Winter 2014", - "menu": "Diesel F/W 2014", + "id": "diesel-f-w-14", + "title": "Diesel F/W 14", + "menu": "Diesel Fall/Winter 2014", "description": "FOR FALL/WINTER 2014, IN AN ACT OF DEFIANT ANONYMITY, DIESEL IS STRIPPING AWAY THE IDENTITIES OF ITS MODELS AND CAMPAIGN STARS, DEMOCRATIZING THE CONCEPT – THERE IS NO SINGULAR IDEA OF WHO THE DIESEL PERSON SHOULD BE. SHOT BY NICK KNIGHT, THE CREATIVE IS INSPIRED BY THE THEME “PICASSO MEETS AVEDON,” REPRESENTING THE NEXT DIMENSION OF DIESEL, INTRODUCING THE SECOND PHASE OF THE BRAND AFTER #DIESELREBOOT.", "video": { "url": "", @@ -76,44 +82,12 @@ }, "media": [ { - "uri": "https://ltho.s3.amazonaws.com/twohustlers%2F38ea6ad0-f689-491f-857a-12d4fa0d4748.jpg", - "caption": "" - }, - { - "uri": "https://ltho.s3.amazonaws.com/twohustlers%2F12184bdd-0aff-43db-882c-8efcb1e583de.jpg", - "caption": "" - }, - { - "uri": "https://ltho.s3.amazonaws.com/twohustlers%2Fb61bd44f-d074-4a20-a641-fc11957e8cd5.jpg", - "caption": "" - }, - { - "uri": "https://ltho.s3.amazonaws.com/twohustlers%2F2a0b26ae-cc35-406e-923b-e60409e53eb8.jpg", - "caption": "" - }, - { - "uri": "https://ltho.s3.amazonaws.com/twohustlers%2Fd2a68db8-018b-4fdf-8f69-c2e4d0aff76a.jpg", - "caption": "" - }, - { - "uri": "https://ltho.s3.amazonaws.com/twohustlers%2F0b24ebbd-07e8-446e-83db-60484f0f3dd9.jpg", - "caption": "" - }, - { - "uri": "https://ltho.s3.amazonaws.com/twohustlers%2F1f8c6b75-c694-4d31-a790-b042b75b3606.jpg", - "caption": "" - }, - { - "uri": "https://ltho.s3.amazonaws.com/twohustlers%2F907a0fbd-1455-4f3d-b28e-ebcba658f2d3.jpg", - "caption": "" - }, - { - "uri": "https://ltho.s3.amazonaws.com/twohustlers%2F17ee7deb-dee5-497a-a8a6-dfe3f9c3105d.jpg", + "uri": "https://ltho.s3.amazonaws.com/twohustlers%2Fefd9dcf8-03c1-42c3-b6cc-3472acf908e4.jpg", "caption": "" } ], "thumbnail": { - "uri": "https://ltho.s3.amazonaws.com/twohustlers%2F94c3bb9d-7d11-43f7-be86-5348a677845f.jpg", + "uri": "", "caption": "" }, "__index": "1" diff --git a/site/public/assets/javascripts/_env.js b/site/public/assets/javascripts/_env.js index aae60b9..60f6528 100644 --- a/site/public/assets/javascripts/_env.js +++ b/site/public/assets/javascripts/_env.js @@ -431,13 +431,14 @@ function build_gallery () { }) gallery.on("cellSelect", function(){ + console.log("DUH") $caption.html( $(gallery.selectedElement).data("caption") ) videos.forEach(function(player){ player.api('pause') }) }) gallery.on("settle", function(){ - gallery && $caption.html( $(gallery.selectedElement).data("caption") ) + $caption.html( $(gallery.selectedElement).data("caption") ) }) gallery.on("staticClick", function(e){ // console.log(e) diff --git a/site/public/assets/javascripts/vendor/flickity.pkgd.js b/site/public/assets/javascripts/vendor/flickity.pkgd.js index 6389014..0471fa5 100644 --- a/site/public/assets/javascripts/vendor/flickity.pkgd.js +++ b/site/public/assets/javascripts/vendor/flickity.pkgd.js @@ -1,6 +1,10 @@ /*! - * Flickity PACKAGED v0.2.3 + * Flickity PACKAGED v1.0.1 * Touch, responsive, flickable galleries + * + * Licensed GPLv3 for open source use + * or Flickity Commercial License for commercial use + * * http://flickity.metafizzy.co * Copyright 2015 Metafizzy */ @@ -1176,7 +1180,7 @@ if ( typeof define === 'function' && define.amd ) { })( window ); /** - * matchesSelector v1.0.2 + * matchesSelector v1.0.3 * matchesSelector( element, '.selector' ) * MIT license */ @@ -1189,6 +1193,10 @@ if ( typeof define === 'function' && define.amd ) { var matchesMethod = ( function() { + // check for the standard method name first + if ( ElemProto.matches ) { + return 'matches'; + } // check un-prefixed if ( ElemProto.matchesSelector ) { return 'matchesSelector'; @@ -1280,7 +1288,7 @@ if ( typeof define === 'function' && define.amd ) { })( Element.prototype ); /** - * Fizzy UI utils v0.1.1 + * Fizzy UI utils v1.0.1 * MIT license */ @@ -1380,7 +1388,7 @@ utils.indexOf = Array.prototype.indexOf ? function( ary, obj ) { // ----- removeFrom ----- // -utils.removeFrom = function( obj, ary ) { +utils.removeFrom = function( ary, obj ) { var index = utils.indexOf( ary, obj ); if ( index != -1 ) { ary.splice( index, 1 ); @@ -1499,14 +1507,12 @@ utils.debounceMethod = function( _class, methodName, threshold ) { // ----- htmlInit ----- // -var jQuery = window.jQuery; - // http://jamesroberts.name/blog/2010/02/22/string-functions-for-javascript-trim-to-camel-case-to-dashed-and-to-underscore/ -function toDashed( str ) { +utils.toDashed = function( str ) { return str.replace( /(.)([A-Z])/g, function( match, $1, $2 ) { return $1 + '-' + $2; }).toLowerCase(); -} +}; var console = window.console; /** @@ -1516,7 +1522,7 @@ var console = window.console; */ utils.htmlInit = function( WidgetClass, namespace ) { docReady( function() { - var dashedNamespace = toDashed( namespace ); + var dashedNamespace = utils.toDashed( namespace ); var elems = document.querySelectorAll( '.js-' + dashedNamespace ); var dataAttr = 'data-' + dashedNamespace + '-options'; @@ -1538,6 +1544,7 @@ utils.htmlInit = function( WidgetClass, namespace ) { // initialize var instance = new WidgetClass( elem, options ); // make available via $().data('layoutname') + var jQuery = window.jQuery; if ( jQuery ) { jQuery.data( elem, namespace, instance ); } @@ -1893,8 +1900,12 @@ return proto; })); /*! - * Flickity v0.2.3 + * Flickity v1.0.1 * Touch, responsive, flickable galleries + * + * Licensed GPLv3 for open source use + * or Flickity Commercial License for commercial use + * * http://flickity.metafizzy.co * Copyright 2015 Metafizzy */ @@ -1999,7 +2010,8 @@ Flickity.defaults = { // initialIndex: 0, percentPosition: true, resize: true, - selectedAttraction: 0.025 + selectedAttraction: 0.025, + setGallerySize: true // watchCSS: false, // wrapAround: false }; @@ -2075,7 +2087,6 @@ Flickity.prototype.activate = function() { this.getSize(); // get cells from children this.reloadCells(); - this.setContainerSize(); if ( this.options.accessibility ) { // allow element to focusable @@ -2109,7 +2120,7 @@ Flickity.prototype.reloadCells = function() { this.cells = this._makeCells( this.slider.children ); this.positionCells(); this._getWrapShiftCells(); - this.setContainerSize(); + this.setGallerySize(); }; /** @@ -2215,8 +2226,10 @@ Flickity.prototype.setCellAlign = function() { this.cellAlign = shorthand ? shorthand[ this.originSide ] : this.options.cellAlign; }; -Flickity.prototype.setContainerSize = function() { - this.viewport.style.height = this.maxCellHeight + 'px'; +Flickity.prototype.setGallerySize = function() { + if ( this.options.setGallerySize ) { + this.viewport.style.height = this.maxCellHeight + 'px'; + } }; Flickity.prototype._getWrapShiftCells = function() { @@ -2267,13 +2280,21 @@ Flickity.prototype._containCells = function() { var lastCell = this.getLastCell(); var contentWidth = this.slideableWidth - lastCell.size[ endMargin ]; var endLimit = contentWidth - this.size.innerWidth * ( 1 - this.cellAlign ); + // content is less than gallery size + var isContentSmaller = contentWidth < this.size.innerWidth; // contain each cell target for ( var i=0, len = this.cells.length; i < len; i++ ) { var cell = this.cells[i]; // reset default target cell.setDefaultTarget(); - cell.target = Math.max( cell.target, this.cursorPosition + firstCellStartMargin ); - cell.target = Math.min( cell.target, endLimit ); + if ( isContentSmaller ) { + // all cells fit inside gallery + cell.target = contentWidth * this.cellAlign; + } else { + // contain to bounds + cell.target = Math.max( cell.target, this.cursorPosition + firstCellStartMargin ); + cell.target = Math.min( cell.target, endLimit ); + } } }; @@ -2293,7 +2314,7 @@ Flickity.prototype.dispatchEvent = function( type, event, args ) { if ( event ) { // create jQuery event var $event = jQuery.Event( event ); - $event.type = type + '.flickity'; + $event.type = type; this.$element.trigger( $event, args ); } else { // just trigger with type if no event available @@ -2330,7 +2351,7 @@ Flickity.prototype.select = function( index, isWrap ) { this.selectedIndex = index; this.setSelectedCell(); this.startAnimation(); - this.dispatchEvent('select'); + this.dispatchEvent('cellSelect'); } }; @@ -2448,7 +2469,7 @@ Flickity.prototype.resize = function() { } this.positionCells(); this._getWrapShiftCells(); - this.setContainerSize(); + this.setGallerySize(); this.positionSliderAtSelected(); }; @@ -2554,6 +2575,9 @@ Flickity.prototype.destroy = function() { eventie.unbind( window, 'resize', this ); } this.emit('destroy'); + if ( jQuery && this.$element ) { + jQuery.removeData( this.element, 'flickity' ); + } delete this.element.flickityGUID; delete instances[ this.guid ]; }; @@ -2599,7 +2623,7 @@ return Flickity; })); /*! - * Unipointer v0.1.0 + * Unipointer v1.1.0 * base class for doing one thing with pointer event * MIT license */ @@ -2736,7 +2760,7 @@ Unipointer.prototype._pointerDown = function( event, pointer ) { Unipointer.prototype.pointerDown = function( event, pointer ) { this._bindPostStartEvents( event ); - this.emitEvent( 'pointerDown', [ this, event, pointer ] ); + this.emitEvent( 'pointerDown', [ event, pointer ] ); }; // hash of events to be bound after start event @@ -2813,7 +2837,7 @@ Unipointer.prototype._pointerMove = function( event, pointer ) { // public Unipointer.prototype.pointerMove = function( event, pointer ) { - this.emitEvent( 'pointerMove', [ this, event, pointer ] ); + this.emitEvent( 'pointerMove', [ event, pointer ] ); }; // ----- end event ----- // @@ -2850,7 +2874,7 @@ Unipointer.prototype._pointerUp = function( event, pointer ) { // public Unipointer.prototype.pointerUp = function( event, pointer ) { - this.emitEvent( 'pointerUp', [ this, event, pointer ] ); + this.emitEvent( 'pointerUp', [ event, pointer ] ); }; // ----- pointer done ----- // @@ -2896,7 +2920,7 @@ Unipointer.prototype._pointerCancel = function( event, pointer ) { // public Unipointer.prototype.pointerCancel = function( event, pointer ) { - this.emitEvent( 'pointerCancel', [ this, event, pointer ] ); + this.emitEvent( 'pointerCancel', [ event, pointer ] ); }; // ----- ----- // @@ -2916,7 +2940,7 @@ return Unipointer; })); /*! - * Unidragger v0.2.0 + * Unidragger v1.1.3 * Draggable base class * MIT license */ @@ -3050,13 +3074,6 @@ var disableImgOndragstart = !isIE8 ? noop : function( handle ) { // ----- start event ----- // -var allowTouchstartNodes = Unidragger.allowTouchstartNodes = { - INPUT: true, - A: true, - BUTTON: true, - SELECT: true -}; - /** * pointer start * @param {Event} event @@ -3071,7 +3088,7 @@ Unidragger.prototype.pointerDown = function( event, pointer ) { } // bind move and end events this._bindPostStartEvents( event ); - this.emitEvent( 'pointerDown', [ this, event, pointer ] ); + this.emitEvent( 'pointerDown', [ event, pointer ] ); }; // base pointer down logic @@ -3079,11 +3096,10 @@ Unidragger.prototype._dragPointerDown = function( event, pointer ) { // track to see when dragging starts this.pointerDownPoint = Unipointer.getPointerPoint( pointer ); + // prevent default, unless touchstart or - if ( !isTouchstartNode && targetNodeName != 'SELECT' ) { + if ( !isTouchstart && targetNodeName != 'SELECT' ) { preventDefaultEvent( event ); } }; @@ -3097,7 +3113,7 @@ Unidragger.prototype._dragPointerDown = function( event, pointer ) { */ Unidragger.prototype.pointerMove = function( event, pointer ) { var moveVector = this._dragPointerMove( event, pointer ); - this.emitEvent( 'pointerMove', [ this, event, pointer, moveVector ] ); + this.emitEvent( 'pointerMove', [ event, pointer, moveVector ] ); this._dragMove( event, pointer, moveVector ); }; @@ -3129,7 +3145,7 @@ Unidragger.prototype.hasDragStarted = function( moveVector ) { * @param {Event or Touch} pointer */ Unidragger.prototype.pointerUp = function( event, pointer ) { - this.emitEvent( 'pointerUp', [ this, event, pointer ] ); + this.emitEvent( 'pointerUp', [ event, pointer ] ); this._dragPointerUp( event, pointer ); }; @@ -3155,7 +3171,7 @@ Unidragger.prototype._dragStart = function( event, pointer ) { }; Unidragger.prototype.dragStart = function( event, pointer ) { - this.emitEvent( 'dragStart', [ this, event, pointer ] ); + this.emitEvent( 'dragStart', [ event, pointer ] ); }; // dragMove @@ -3169,7 +3185,8 @@ Unidragger.prototype._dragMove = function( event, pointer, moveVector ) { }; Unidragger.prototype.dragMove = function( event, pointer, moveVector ) { - this.emitEvent( 'dragMove', [ this, event, pointer, moveVector ] ); + preventDefaultEvent( event ); + this.emitEvent( 'dragMove', [ event, pointer, moveVector ] ); }; // dragEnd @@ -3186,7 +3203,7 @@ Unidragger.prototype._dragEnd = function( event, pointer ) { }; Unidragger.prototype.dragEnd = function( event, pointer ) { - this.emitEvent( 'dragEnd', [ this, event, pointer ] ); + this.emitEvent( 'dragEnd', [ event, pointer ] ); }; // ----- onclick ----- // @@ -3202,15 +3219,16 @@ Unidragger.prototype.onclick = function( event ) { // triggered after pointer down & up with no/tiny movement Unidragger.prototype._staticClick = function( event, pointer ) { - // allow click in text input - if ( event.target.nodeName == 'INPUT' && event.target.type == 'text' ) { + // allow click in s and