alloy-ui

LifeRay creating a new type of aui validator

吃可爱长大的小学妹 提交于 2019-12-13 06:24:49
问题 I want to create a new type of aui validator. For example : <aui:input name="firstName" type="text" maxlength="40"> <aui:validator name="required" /> <aui:validator name="alpha" /> </aui:input> the alpha validator does not accept the space character, i want to use a type that accepts alpha characters plus the space character, i have already a solution using javascript to use a custom validator, but i want to define a new validator type to use like the others by invoking the validator tag e.g

AlloyUI (diagram-builder) extends

醉酒当歌 提交于 2019-12-12 03:45:42
问题 I'm trying to customise diagram builder, I created new type of node and trying to add custom attributes with custom editor. I just extend from dropdownCellEditor and it already doesn't work (editor appears, but can not save value, seems save and cancel buttons do not work) :( If I replace my custom editor to DropdownCellEditor - it's ok. editor: new Y.DropDownCellEditor({options: { apple: 'Apple', banana: 'Banana', cherry: 'Cherry', kiwi: 'Kiwi' }}), Can someone explain what's going wrong ?

How can I get a localized version of a YUI 3 or AlloyUI component?

旧街凉风 提交于 2019-12-12 01:45:18
问题 As an example, how could I render an AlloyUI scheduler which has the days in Japanese rather than English? 回答1: To access a localized version of a YUI 3 component you must use the YUI config object's lang property. When specifying a YUI sandbox, pass it the language code(s) which you want the component(s) to be localized for: YUI({ lang : 'ja-JP' }).use( // your code here... Here is a specific example with the AlloyUI scheduler: YUI({ lang : 'ja-JP' }).use('aui-scheduler', function(Y) { new Y

LifeRay form validation using Alloy UI

喜你入骨 提交于 2019-12-11 08:37:10
问题 I use LifeRay 6.1.2. And it have built-in Alloy UI 1.5. framework. So I try to reproduce this form validation example (I copied all code), but it don't work as expected (error labels in DOM, but they are don't visible in form (see EDIT1)): Expected result is (you can try yourself live example using link provided above): Where is problem? How to solve it? Thanks. EDIT1: After some research, I realized that if I delete aui-form-validator-message CSS class from error message's DIV tag (it

yui input group validation

断了今生、忘了曾经 提交于 2019-12-10 10:56:51
问题 I've been working on the validation of a form using AlloyUI/Yui, but I have the following problem: I have 3 input fields that are for the date of birth, they are all required so when I click the submit button I get 3 "this field is required" messages that are breaking my layout. Is there a way to make the script show only one message instead of 3? I have a jsfiddle (http://jsfiddle.net/0yak4z07/9/) showing the issue. The code is pasted below too: YUI().use('aui-form-validator', function (Y) {

how to capture the data sent by alloy ui io request in serveresource method?

℡╲_俬逩灬. 提交于 2019-12-06 16:13:50
Getting blank values for title and description in serveResource method.Is this the right way to send the parameters from io request? After inserting blank values in database I have to reload the page to see the inserted values?So io-request is not ajax request? <aui:script use="aui-base"> A.one('#<portlet:namespace/>save').on('click', function(event) { var A = AUI(); var title=A.one('#<portlet:namespace/>title').val(); alert(title); var description=A.one('#<portlet:namespace/>description'); var url = '<%= newJob.toString() %>'; A.io.request( url, { method:'POST', data: { <portlet:namespace /

yui input group validation

青春壹個敷衍的年華 提交于 2019-12-06 07:29:49
I've been working on the validation of a form using AlloyUI/Yui, but I have the following problem: I have 3 input fields that are for the date of birth, they are all required so when I click the submit button I get 3 "this field is required" messages that are breaking my layout. Is there a way to make the script show only one message instead of 3? I have a jsfiddle ( http://jsfiddle.net/0yak4z07/9/ ) showing the issue. The code is pasted below too: YUI().use('aui-form-validator', function (Y) { var rules = { _mine_WAR_portlet_dd: { required: true, digits: true, maxLength: 2, range: [1, 31] },

How can I add a customized buttons to the AlloyUI Scheduler's event popup?

泪湿孤枕 提交于 2019-12-05 13:04:23
How can I add a customized buttons to the AlloyUI Scheduler 's event popup? The event popup includes Save , Cancel , and Delete buttons, but I would like to add another one (for example Edit ). I've looked through the Scheduler s API Doc , but I cannot find any information on adding buttons to the event popup. The SchedulerEventRecorder class contains a reference to the popover which contains the form to which you are seeking to add buttons. However, I've tried to customize the toolbar footer (within the toolbar within the popover within the scheduler) which contains the buttons, and it doesn

Bootstrap modal in Liferay

一世执手 提交于 2019-12-05 09:57:49
I use Bootstrap 2.3.2 and Liferay 6.2 bundled with Tomcat. I have some modal windows with complex body structure created in Bootstrap 2.3.2 and I would like to use them in my portal. Here is said that Liferay uses Bootstrap 2.3.2 css, but not Bootstrap 2.3.2 javascript and components like modals, tooltips, tabs, ... are included in AlloyUI. I included Bootstrap 2.3.2 javascript and tried to use my modal windows, but if I want to show a modal window it doesn't appear. I would like to ask, how can i show native bootstrap modals in Liferay. The reason that your modal is not appearing is most

Save, Edit, Delete, and Cancel events in AlloyUI Scheduler

筅森魡賤 提交于 2019-12-04 17:04:23
How can I listen for the Save, Edit, Delete, and Cancel events from AlloyUI's Scheduler? I need to save the value in our database for future use, but I don't see any documentation for this. The current code that I have is this: YUI().use('aui-scheduler', function(Y) { var items = [ { content: 'Wake Early' }, { content: 'Exercise' }, ]; var schedulerViews = [ new Y.SchedulerWeekView(), new Y.SchedulerDayView(), new Y.SchedulerMonthView(), new Y.SchedulerAgendaView() ]; var eventRecorder = new Y.SchedulerEventRecorder(); new Y.Scheduler({ boundingBox: '#scheduler', items: items, views: