diff --git a/.studiorc b/.studiorc index 49965dc..3491131 100644 --- a/.studiorc +++ b/.studiorc @@ -29,10 +29,10 @@ build-app() { pushd "/src/sencha-workspace/${app_name}" > /dev/null echo " Running: sencha app refresh" - sencha app refresh + hab pkg exec jarvus/sencha-cmd sencha app refresh echo " Running: sencha app build development" - sencha app build development + hab pkg exec jarvus/sencha-cmd sencha app build development popd > /dev/null diff --git a/html-templates/app/SlateAdmin/ext.tpl b/html-templates/webapps/SlateAdmin/sencha.tpl similarity index 79% rename from html-templates/app/SlateAdmin/ext.tpl rename to html-templates/webapps/SlateAdmin/sencha.tpl index 422ba64..eef22ee 100644 --- a/html-templates/app/SlateAdmin/ext.tpl +++ b/html-templates/webapps/SlateAdmin/sencha.tpl @@ -1,4 +1,4 @@ -{extends app/slate-ext.tpl} +{extends "webapps/slate-sencha.tpl"} {block meta} {$title = "Manage Slate"} @@ -6,11 +6,12 @@ {/block} {block css-app} - {cssmin fonts/font-awesome.css} + {cssmin "fonts/font-awesome.css"} + {$dwoo.parent} {/block} -{block js-app-local} +{block js-app} {$dwoo.parent} {foreach item=package from=SlateAdmin::getPlugins()} diff --git a/php-classes/SlateAdmin.php b/php-classes/SlateAdmin.php deleted file mode 100644 index 5313b5b..0000000 --- a/php-classes/SlateAdmin.php +++ /dev/null @@ -1,11 +0,0 @@ -requireAccountLevel('Staff'); + return static::sendResponse(WebApp::load()->render(), 'webapps/SlateAdmin'); + } +} \ No newline at end of file diff --git a/php-classes/SlateAdmin/WebApp.php b/php-classes/SlateAdmin/WebApp.php new file mode 100644 index 0000000..f0bd6e7 --- /dev/null +++ b/php-classes/SlateAdmin/WebApp.php @@ -0,0 +1,29 @@ +setPayloadKey('plugins', static::getPlugins()); + + return $response; + } +} \ No newline at end of file diff --git a/sencha-workspace/.gitignore b/sencha-workspace/.gitignore index 567609b..1d09399 100644 --- a/sencha-workspace/.gitignore +++ b/sencha-workspace/.gitignore @@ -1 +1,2 @@ build/ +sencha-error-*.log diff --git a/sencha-workspace/SlateAdmin/app.json b/sencha-workspace/SlateAdmin/app.json index d276bd9..c92a2e0 100644 --- a/sencha-workspace/SlateAdmin/app.json +++ b/sencha-workspace/SlateAdmin/app.json @@ -3,6 +3,7 @@ "namespace": "SlateAdmin", "version": "1.0.0.0", "framework": "ext", + "framework.version": "5.1.1.451", "theme": "slate-theme", /** diff --git a/sencha-workspace/SlateAdmin/app/store/Locations.js b/sencha-workspace/SlateAdmin/app/store/Locations.js index ae65bf7..2dfb1a7 100644 --- a/sencha-workspace/SlateAdmin/app/store/Locations.js +++ b/sencha-workspace/SlateAdmin/app/store/Locations.js @@ -1,12 +1,9 @@ -/*jslint browser: true, undef: true *//*global Ext*/ Ext.define('SlateAdmin.store.Locations', { extend: 'Ext.data.Store', + model: 'SlateAdmin.model.Location', - proxy: { - type: 'slaterecords', - url: '/locations', - startParam: false, - limitParam: false + config: { + pageSize: 0 } }); \ No newline at end of file diff --git a/sencha-workspace/SlateAdmin/app/store/Terms.js b/sencha-workspace/SlateAdmin/app/store/Terms.js index 4aa802d..163be45 100644 --- a/sencha-workspace/SlateAdmin/app/store/Terms.js +++ b/sencha-workspace/SlateAdmin/app/store/Terms.js @@ -1,21 +1,25 @@ -/*jslint browser: true, undef: true *//*global Ext*/ Ext.define('SlateAdmin.store.Terms', { extend: 'Ext.data.Store', + model: 'SlateAdmin.model.Term', - proxy: { - type: 'slaterecords', - url: '/terms', - startParam: false, - limitParam: false, - extraParams: { - includeCurrent: true - } + config: { + pageSize: 0, + + proxy: { + type: 'slaterecords', + url: '/terms', + extraParams: { + includeCurrent: true + } + }, + + sorters: [{ + property: 'Right', + direction: 'DESC' + }] }, - sorters: [{ - property: 'Right', - direction: 'DESC' - }], + getCurrentTerm: function() { var me = this, diff --git a/sencha-workspace/SlateAdmin/app/store/courses/Schedules.js b/sencha-workspace/SlateAdmin/app/store/courses/Schedules.js index 3f760b9..0c118b2 100644 --- a/sencha-workspace/SlateAdmin/app/store/courses/Schedules.js +++ b/sencha-workspace/SlateAdmin/app/store/courses/Schedules.js @@ -1,12 +1,9 @@ -/*jslint browser: true, undef: true *//*global Ext*/ Ext.define('SlateAdmin.store.courses.Schedules', { extend: 'Ext.data.Store', + model: 'SlateAdmin.model.course.Schedule', - proxy: { - type: 'slaterecords', - url: '/schedules', - startParam: false, - limitParam: false + config: { + pageSize: 0 } }); \ No newline at end of file diff --git a/sencha-workspace/SlateAdmin/app/store/people/Groups.js b/sencha-workspace/SlateAdmin/app/store/people/Groups.js index a9cf76b..38acccd 100644 --- a/sencha-workspace/SlateAdmin/app/store/people/Groups.js +++ b/sencha-workspace/SlateAdmin/app/store/people/Groups.js @@ -1,20 +1,22 @@ -/*jslint browser: true, undef: true *//*global Ext*/ Ext.define('SlateAdmin.store.people.Groups', { extend: 'Ext.data.Store', + model: 'SlateAdmin.model.person.Group', - sorters: 'Left', - proxy: { - type: 'slaterecords', - url: '/groups', - startParam: false, - limitParam: false, - include: 'Population', - extraParams: { - parentGroup: 'any' - } + config: { + sorters: 'Left', + pageSize: 0, + proxy: { + type: 'slaterecords', + url: '/groups', + include: 'Population', + extraParams: { + parentGroup: 'any' + } + }, }, + onProxyLoad: function(operation) { var me = this, i = 0, count, group, parentGroup; diff --git a/sencha-workspace/SlateAdmin/app/store/people/People.js b/sencha-workspace/SlateAdmin/app/store/people/People.js index 44cdda6..31c8631 100644 --- a/sencha-workspace/SlateAdmin/app/store/people/People.js +++ b/sencha-workspace/SlateAdmin/app/store/people/People.js @@ -1,6 +1,9 @@ -/*jslint browser: true, undef: true *//*global Ext*/ Ext.define('SlateAdmin.store.people.People', { extend: 'Ext.data.Store', - model: 'Slate.model.person.Person' + + model: 'Slate.model.person.Person', + config: { + pageSize: 0 + } }); \ No newline at end of file diff --git a/sencha-workspace/SlateAdmin/plan.sh b/sencha-workspace/SlateAdmin/plan.sh new file mode 100644 index 0000000..242596c --- /dev/null +++ b/sencha-workspace/SlateAdmin/plan.sh @@ -0,0 +1,3 @@ +source ../plan.abstract.sh + +pkg_name=slate-admin diff --git a/sencha-workspace/plan.abstract.sh b/sencha-workspace/plan.abstract.sh new file mode 100644 index 0000000..d34a797 --- /dev/null +++ b/sencha-workspace/plan.abstract.sh @@ -0,0 +1,64 @@ +pkg_origin=slate +pkg_maintainer="Chris Alfano " +pkg_license=("MIT") +pkg_build_deps=( + core/git + jarvus/sencha-cmd/6.5.2.15 +) + + +# implement git-based dynamic version strings +pkg_version() { + if [ -n "${pkg_last_tag}" ]; then + echo "${pkg_last_version}-git+${pkg_last_tag_distance}.${pkg_commit}" + else + echo "${pkg_last_version}-git+${pkg_commit}" + fi +} + +do_before() { + do_default_before + + # configure git repository + export GIT_DIR="/src/.git" + + # load version information from git + pkg_commit="$(git rev-parse --short HEAD)" + pkg_last_tag="$(git describe --tags --abbrev=0 ${pkg_commit} || true 2>/dev/null)" + + if [ -n "${pkg_last_tag}" ]; then + pkg_last_version=${pkg_last_tag#v} + pkg_last_tag_distance="$(git rev-list ${pkg_last_tag}..${pkg_commit} --count)" + else + pkg_last_version="0.0.0" + fi + + # initialize pkg_version + update_pkg_version +} + + +# implement build workflow +do_build() { + pushd "${PLAN_CONTEXT}" > /dev/null + + sencha ant \ + -Dapp.output.base="${CACHE_PATH}" \ + -Dbuild.temp.dir="/tmp" \ + -Dapp.cache.deltas=false \ + -Dapp.output.microloader.enable=false \ + -Dbuild.enable.appmanifest=false \ + -Denable.standalone.manifest=true \ + production \ + build + + popd > /dev/null +} + +do_install() { + cp -r "${CACHE_PATH}" "${pkg_prefix}/app" +} + +do_strip() { + return 0 +} \ No newline at end of file diff --git a/site-root/manage.php b/site-root/manage.php index 3b0fa47..13b9b5e 100644 --- a/site-root/manage.php +++ b/site-root/manage.php @@ -1,8 +1,3 @@ requireAccountLevel('Staff'); - -Sencha_RequestHandler::respond('app/SlateAdmin/ext', array( - 'App' => Sencha_App::getByName('SlateAdmin') - ,'mode' => 'production' -)); \ No newline at end of file +SlateAdmin\RequestHandler::handleRequest(); \ No newline at end of file