Skip to content

Instantly share code, notes, and snippets.

View mauritslamers's full-sized avatar

Maurits Lamers mauritslamers

  • Den Haag, Netherlands
View GitHub Profile
<% content_for('body') do %>
<% form_view :outlet => true, :tag => 'table', :class =>'form' do %>
BODY.RHTML
<% content_for('body') do %>
<div class="Login_EntryPage">
<% view do %>
<% form_view :outlet => true, :tag => 'table', :class =>'form' do %>
<tr>
<td class="Login_EntryPage_NameLabel"><%= loc(%(label_username)) %></td>
<td class="Login_EntryPage_NameField">
<%= text_field_view :field => :user_name,
$records = array();
$ids = array();
$products = array();
$product_one = new stdClass;
$product_one->id=1;
$product_one->name="cheese";
$product_one->price=1;
$product_two = new stdClass;
=== model 1
// ==========================================================================
// Education
// ==========================================================================
require('core');
require('orion_fw');
How to get the fixtures in your app:
(main.js)
OrionFw.server.preload(OrionFw.FIXTURES);
Fixtures file:
// ==========================================================================
<%= source_list_view :cc_cm_course_list_cv,
:example_view => 'SC.ListItemView',
:width => 300,
:is_editable => false,
:content_value_key => 'name',
:can_order_content => false,
:content_value_editable => false,
:can_reorder_content => false,
:bind => {
:content => 'CourseCoordinator.CM_courseListController.arrangedObjects',
position: absolute;
top: 0px;
width: 250px;
bottom: 10px;
left: 0px;
border-top-width: 0px;
border-right-width: 0px;
border-bottom-width: 0px;
border-left-width: 0px;
_assignedCommissionMembersBinding: 'AdmissionExam.currentExamCommissionController.arrangedObjects',
_assignedCommissionMembersObserver: function(){
var assignedMembers = this.get('_assignedCommissionMembers');
if((assignedMembers) && (assignedMembers.length>0) && (this.get('content')) && (this.get('arrangedObjects').length>0)){
var leaveOut = assignedMembers.get('guid');
var allGuids = this.get('content').get('records').get('guid');
var conditionArray = [];
allGuids.each(function(s){
var pos = leaveOut.indexOf(s);
// ==========================================================================
// Education
// ==========================================================================
require('core');
require('orion_fw');
/** @class
(Document your class here)
_arrangedObjects: [],
arrangedObjects: function( key, value ) {
if ( value ) {
/* adjust for incoming array, store internally, e.g. this._aryToReturn */
var newList = [];
value.each(function(s){
newList.push(s.get('ID_from_the_linking_table'));
});
this.set('_arrangedObjects',newList);