CatalystX-CRUD-YUI
view release on metacpan or search on metacpan
lib/CatalystX/CRUD/YUI/TT/crud/form.tt view on Meta::CPAN
"</pre>";
ELSE;
field.output_value;
END;
ELSIF field.isa('Rose::HTML::Form::Field::DateTime');
IF (field.internal_value.epoch.defined);
field.output_value _ '';
END;
ELSIF field.isa('Rose::HTMLx::Form::Field::Boolean');
field.output_value == '1' ? 'true' : 'false';
ELSIF field.isa('Rose::HTML::Form::Field::PopUpMenu');
field.value_label;
ELSE;
form.field_value( fname );
END;
PROCESS crud/related_field_link.tt;
"</div>";
# optionally pass the readonly value through hidden
lib/CatalystX/CRUD/YUI/TT/crud/submenu.tt view on Meta::CPAN
[% # backwards compat
IF form_links.defined;
SubMenu = form_links;
END;
%]
[% IF SubMenu.size %]
<div class="links">
<ul id="submenu">
[% FOREACH item = SubMenu %]
<li>
[% IF item.iframe %]
<a class="button" href="#"
onclick="YAHOO.crud.open_iframe_portal('[% item.href %]'); return false"
>[% item.text %]</a>
[% ELSIF item.http == 'POST' %]
<form class="inline" method="post"
action="[% item.href %]"
[% IF item.confirm %]onclick="return confirm('[% item.confirm | html %]')"[% END %]
><button class="button">[% item.text %]</button></form>
lib/CatalystX/CRUD/YUI/TT/crud/yui_header.tt view on Meta::CPAN
css => [],
js => [],
};
ExtJS.js.push('adapter/ext/ext-base');
ExtJS.js.push('ext-all');
# column filters do not work well with m2m so
# they are disabled by default
IF USE_LIVEGRID_FILTERS;
ExtJS.js.push('source/widgets/menu/DateMenu');
ExtJS.js.push('examples/grid-filtering/menu/EditableItem');
ExtJS.js.push('examples/grid-filtering/menu/RangeMenu');
ExtJS.js.push('examples/grid-filtering/grid/GridFilters');
ExtJS.js.push('examples/grid-filtering/grid/filter/Filter');
ExtJS.js.push('examples/grid-filtering/grid/filter/StringFilter');
ExtJS.js.push('examples/grid-filtering/grid/filter/DateFilter');
ExtJS.js.push('examples/grid-filtering/grid/filter/ListFilter');
ExtJS.js.push('examples/grid-filtering/grid/filter/NumericFilter');
ExtJS.js.push('examples/grid-filtering/grid/filter/BooleanFilter');
END;
lib/CatalystX/CRUD/YUI/TT/crud/yui_menu.tt view on Meta::CPAN
// Initialize and render the menu when it is available in the DOM
YAHOO.util.Event.onContentReady("schema_menu", function () {
/*
Instantiate the menu. The first argument passed to the
constructor is the id of the element in the DOM that
represents the menu; the second is an object literal
representing a set of configuration properties for
the menu.
*/
var oMenu = new YAHOO.widget.MenuBar(
"schema_menu",
{
autosubmenudisplay: false,
hidedelay: 500,
lazyload: true
}
);
/*
Call the "render" method with no arguments since the
markup for this menu already exists in the DOM.
*/
oMenu.render();
});
lib/CatalystX/CRUD/YUI/TT/static/css/crud/menu.css view on Meta::CPAN
/*
Turn off the border on the top unit since Menu has it's own border
*/
.yui-skin-sam .yui-layout .yui-layout-unit-top div.yui-layout-bd {
/* border: none; */
}
/* main menu */
.yui-skin-sam .bd {
/* background-color: #7a0019; */
/* background-color: #f5f5f5; */
border-top: 1px solid #aaa;
lib/CatalystX/CRUD/YUI/TT/static/js/crud.js view on Meta::CPAN
}
}
);
}
Ext.namespace('Ext.ux'); // livegrid js requires
if (typeof USE_LIVEGRID_FILTERS != 'undefined') {
// grid filter icons
Ext.menu.RangeMenu.prototype.icons = {
gt: 'img/greater_then.png',
lt: 'img/less_then.png',
eq: 'img/equals.png'
};
Ext.grid.filter.StringFilter.prototype.icon = 'img/find.png';
}
/* extend the CheckboxSelectionModel to determine if the click action
was on the checkbox or elsewhere in the row
*/
lib/CatalystX/CRUD/YUI/TT/static/js/crud.js view on Meta::CPAN
YAHOO.crud.date_picker = function(id) {
YAHOO.crud.make_calendar_popup(id);
}
YAHOO.crud.make_calendar_popup = function(id, set_time) {
var Dom = YAHOO.util.Dom;
// Create an Overlay instance to house the Calendar instance
var oCalendarMenu = new YAHOO.widget.Overlay("calendar_for_" + id, { zIndex: 99 });
/*
Create an empty body element for the Overlay instance in order
to reserve space to render the Calendar instance into.
*/
oCalendarMenu.setBody(" ");
oCalendarMenu.body.id = "calendarcontainer_" + id;
// Render the Overlay instance into the Button's parent element
oCalendarMenu.render(Dom.get(id + "_calendar_container"));
// Align the Overlay
oCalendarMenu.align();
/*
Create a Calendar instance and render it into the body
element of the Overlay.
*/
var oCalendar = new YAHOO.widget.Calendar(
"buttoncalendar_" + id,
oCalendarMenu.body.id,
{
close: true
});
oCalendar.render();
/*
we have a close button but we want to hide the Overlay,
not the calendar
*/
oCalendar.beforeHideEvent.subscribe(function() {
oCalendarMenu.hide();
return false; // prevent calendar from being hidden
});
/*
Subscribe to the Calendar instance's "changePage" event to
keep the Overlay visible when either the previous or next page
controls are clicked.
*/
oCalendar.changePageEvent.subscribe(function () {
window.setTimeout(function () {
oCalendarMenu.show();
}, 0);
});
/*
Subscribe to the Calendar instance's "select" event to
update the form field when the user
selects a date.
*/
oCalendar.selectEvent.subscribe(function (p_sType, p_aArgs) {
lib/CatalystX/CRUD/YUI/TT/static/js/crud.js view on Meta::CPAN
aDate[2] = '0' + aDate[2];
Dom.get(id).value = aDate.join('-');
if (set_time) {
Dom.get(id).value += ' 00:00:00';
}
}
// hide calendar once date selected
oCalendarMenu.hide();
});
}
// based on
// http://developer.yahoo.com/yui/examples/editor/switch_editor_clean.html
// similar to CatalystX::CMS
YAHOO.crud.wysiwygify = function( textareaId, textareaTitle ) {
var Dom = YAHOO.util.Dom,
( run in 1.544 second using v1.01-cache-2.11-cpan-49f99fa48dc )