Skip to content

Commit

Permalink
Built some of the Quick Links widgets. Uses an accordion to collapse …
Browse files Browse the repository at this point in the history
…"Saved Links", "Common Actions", and "Quick Access Forms". The Common Actions are not yet implemented, and there is no "Search by SKU" form.
  • Loading branch information
nullsound committed Jul 20, 2010
1 parent efc5039 commit 3c5d0c2
Show file tree
Hide file tree
Showing 10 changed files with 603 additions and 57 deletions.
30 changes: 28 additions & 2 deletions share/ic/js/manage.js
Expand Up @@ -18,6 +18,7 @@

YUI(
{
gallery: 'gallery-2010.07.14-19-50',
filter: 'raw',
combine: false,
insertBefore: 'styleoverrides',
Expand Down Expand Up @@ -161,21 +162,33 @@ YUI(
path: "manage/widgets/menu.js",
requires: [
"ic-manage-widget-menu-css",
"widget",
"node-menunav",
"io",
"json-parse",
"event",
"node",
"substitute"
]
},
"ic-manage-widget-quicklinks": {
path: "manage/widgets/quicklinks.js",
requires: [
"ic-manage-widget-quicklinks-css",
"widget",
"gallery-accordion-css",
"gallery-accordion",
"gallery-form",
"gallery-form-values",
"gallery-storage-lite"
]
},
"ic-manage-window": {
path: "manage/window.js",
requires: [
"ic-manage-window-css",
"base-base",
"ic-manage-widget-container",
"ic-manage-widget-menu",
"ic-manage-widget-quicklinks",
"ic-manage-widget-dashboard",
"ic-history-manager",
"yui2-layout",
Expand Down Expand Up @@ -211,6 +224,10 @@ YUI(
path: "manage/widgets/menu.css",
type: "css"
},
"ic-manage-widget-quicklinks-css": {
path: "manage/widgets/quicklinks.css",
type: "css"
},
"ic-manage-plugin-tabpanel-css": {
path: "manage/plugins/tabpanel.css",
type: "css"
Expand All @@ -225,6 +242,15 @@ YUI(
}
}
},
gallerycss: {
base: "http://yui.yahooapis.com/gallery-2010.04.21-21-51/build/",
modules: {
"gallery-accordion-css": {
path: "gallery-accordion/assets/skins/sam/gallery-accordion.css",
type: "css"
}
}
},
yui2css: {
}
}
Expand Down
5 changes: 5 additions & 0 deletions share/ic/js/manage/history.js
Expand Up @@ -24,6 +24,11 @@ YUI.add(

Y.IC.ManageHistory = ManageHistory = {

// profile name constants, link into the profiles[] array
DASH: 0,
DTMAX: 1,
DTDV: 2,

hqueue: {}, // not really a queue...
// keeps track of what needs to be in the
// next history update
Expand Down
37 changes: 22 additions & 15 deletions share/ic/js/manage/widgets/container.js
Expand Up @@ -169,28 +169,35 @@ YUI.add(
var code = splits[0];
// Y.log("code: " + code);
if (config.sub_kind === "list") {
this._cache[config.args] = new Y.IC.ManageFunctionExpandableList(
{
code: code,
expandable: false,
prefix: '_ls'
}
this._cache[config.args] =
new Y.IC.ManageFunctionExpandableList(
{
code: code,
expandable: false,
prefix: '_ls'
}
);
this._cache[config.args].render(
this.get("contentBox")
);
this._cache[config.args].render( this.get("contentBox") );
}
else if (config.sub_kind === "detail") {
var addtl_args = splits[1] + "";
// Y.log("addtl_args: " + addtl_args);
this._cache[config.args] = new Y.IC.ManageFunctionDetail(
{
code: code,
addtl_args: addtl_args,
prefix: '_dx'
}
this._cache[config.args] =
new Y.IC.ManageFunctionDetail(
{
code: code,
addtl_args: addtl_args,
prefix: '_dx'
}
);
this._cache[config.args].render(
this.get("contentBox")
);
this._cache[config.args].render( this.get("contentBox") );
}
else {
// any other functions..?
}
}
else {
Expand All @@ -206,7 +213,7 @@ YUI.add(
new_widget = null;
}
else {
// Y.log("Load widget called with undefined/unrecognized kind. " +
// Y.log("Load widget called with unrecognized kind. " +
// "Doing nothing. kind: " + config.kind);
return;
}
Expand Down
14 changes: 9 additions & 5 deletions share/ic/js/manage/widgets/functions/list.js
Expand Up @@ -315,11 +315,12 @@ YUI.add(
_doBeforeLoadData: function(oRequest, oResponse, oPayload) {
// Y.log('list::doBeforeLoadData');
var meta = oResponse.meta;
var meta_data = this._meta_data;

oPayload.totalRecords = meta.totalRecords || oPayload.totalRecords;
oPayload.pagination = {
rowsPerPage: Number(meta.paginationRowsPerPage) ||
this._meta_data.page_count,
meta_data.page_count,
recordOffset: Number(meta.paginationRecordOffset) || 0
};

Expand All @@ -330,18 +331,21 @@ YUI.add(
}
}
else {
if (this._meta_data.data_table_initial_sort &&
this._meta_data.data_table_initial_sort.dir) {
if (meta_data.data_table_initial_sort &&
meta_data.data_table_initial_sort.dir) {
meta.sortDir = 'yui-dt-' +
this._meta_data.data_table_initial_sort.dir;
meta_data.data_table_initial_sort.dir;
}
else {
meta.sortDir = 'yui-dt-desc'
}
}
oPayload.sortedBy = {
key: meta.sortKey ||
this._meta_data.data_table_initial_sort.key ||
(function () {
if (meta_data.data_table_initial_sort)
return meta_data.data_table_initial_sort.key;
})() ||
"id",
dir: meta.sortDir
};
Expand Down
5 changes: 5 additions & 0 deletions share/ic/js/manage/widgets/menu.js
Expand Up @@ -172,7 +172,12 @@ YUI.add(
"@VERSION@",
{
requires: [
"ic-manage-widget-menu-css",
"widget",
"node-menunav",
"io",
"json-parse",
"substitute"
]
}
);
Expand Down

0 comments on commit 3c5d0c2

Please sign in to comment.