Skip to content
This repository has been archived by the owner on Aug 4, 2019. It is now read-only.

Commit

Permalink
Merge pull request #163 from SlateFoundation/develop
Browse files Browse the repository at this point in the history
Release: slate-admin v2.4.0
  • Loading branch information
themightychris authored Aug 4, 2018
2 parents 87cbd89 + 6995c03 commit 8b5afc4
Show file tree
Hide file tree
Showing 15 changed files with 159 additions and 60 deletions.
4 changes: 2 additions & 2 deletions .studiorc
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
{extends app/slate-ext.tpl}
{extends "webapps/slate-sencha.tpl"}

{block meta}
{$title = "Manage Slate"}
{$dwoo.parent}
{/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()}
Expand Down
11 changes: 0 additions & 11 deletions php-classes/SlateAdmin.php

This file was deleted.

13 changes: 13 additions & 0 deletions php-classes/SlateAdmin/RequestHandler.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

namespace SlateAdmin;


class RequestHandler extends \Emergence\Site\RequestHandler
{
public static function handleRequest()
{
$GLOBALS['Session']->requireAccountLevel('Staff');
return static::sendResponse(WebApp::load()->render(), 'webapps/SlateAdmin');
}
}
29 changes: 29 additions & 0 deletions php-classes/SlateAdmin/WebApp.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?php

namespace SlateAdmin;


class WebApp extends \Emergence\WebApps\SenchaApp
{
public static $plugins = [];


public static function getPlugins()
{
return static::$plugins;
}

public static function load($name = 'SlateAdmin')
{
return parent::load($name);
}

public function render()
{
$response = parent::render();

$response->setPayloadKey('plugins', static::getPlugins());

return $response;
}
}
1 change: 1 addition & 0 deletions sencha-workspace/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
build/
sencha-error-*.log
1 change: 1 addition & 0 deletions sencha-workspace/SlateAdmin/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"namespace": "SlateAdmin",
"version": "1.0.0.0",
"framework": "ext",
"framework.version": "5.1.1.451",
"theme": "slate-theme",

/**
Expand Down
9 changes: 3 additions & 6 deletions sencha-workspace/SlateAdmin/app/store/Locations.js
Original file line number Diff line number Diff line change
@@ -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
}
});
30 changes: 17 additions & 13 deletions sencha-workspace/SlateAdmin/app/store/Terms.js
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
9 changes: 3 additions & 6 deletions sencha-workspace/SlateAdmin/app/store/courses/Schedules.js
Original file line number Diff line number Diff line change
@@ -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
}
});
24 changes: 13 additions & 11 deletions sencha-workspace/SlateAdmin/app/store/people/Groups.js
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
7 changes: 5 additions & 2 deletions sencha-workspace/SlateAdmin/app/store/people/People.js
Original file line number Diff line number Diff line change
@@ -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
}
});
3 changes: 3 additions & 0 deletions sencha-workspace/SlateAdmin/plan.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
source ../plan.abstract.sh

pkg_name=slate-admin
64 changes: 64 additions & 0 deletions sencha-workspace/plan.abstract.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
pkg_origin=slate
pkg_maintainer="Chris Alfano <[email protected]>"
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
}
7 changes: 1 addition & 6 deletions site-root/manage.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
<?php

$GLOBALS['Session']->requireAccountLevel('Staff');

Sencha_RequestHandler::respond('app/SlateAdmin/ext', array(
'App' => Sencha_App::getByName('SlateAdmin')
,'mode' => 'production'
));
SlateAdmin\RequestHandler::handleRequest();

0 comments on commit 8b5afc4

Please sign in to comment.