Permalink
Browse files

Various fixes and corrections

  • Loading branch information...
1 parent b8a552e commit 6d43455b4d81152d380791412f5b3dfc89051cdb @ewoudj committed Sep 19, 2011
View
@@ -25,7 +25,13 @@ var feedModel = new model({
type: 'string',
view: {
title: 'Title',
- required: true
+ required: true,
+ special: {
+ summary: {
+ type: 'text',
+ role: 'title'
+ }
+ }
}
},
description:{
@@ -49,7 +55,13 @@ var feedModel = new model({
type: 'string',
view: {
title: 'URL',
- required: false
+ required: true,
+ special: {
+ summary: {
+ type: 'text',
+ role: 'summary'
+ }
+ }
}
}
},
@@ -89,12 +89,15 @@ var application = function(config, session, clientData){
if(!currentModel || (config.model && config.model === registeredModel.name)){
currentModel = registeredModel;
}
+ }
+ for(var s in registry){
+ var registeredModel = registry[s];
if(registeredModel.navigatable && registeredModel.canUserNavigate(session.user)){
navigationItems.push({
tag:'a',
controlValue: registeredModel.navigationTitle || registeredModel.friendlyName,
attributes: {
- cls: 'sidepanelbutton',
+ cls: (registeredModel === currentModel) ? 'sidepanelbutton selected' : 'sidepanelbutton',
href: rest.toUrl({
view: 'search',
model: registeredModel.name,
@@ -6,11 +6,12 @@ var form = require('./form').form;
* Text control
*/
var textControl = function(config){
+ config = config || {};
this.parentControl = config.parentControl;
if(config.mode === 'view'){
merge( this, {
controlValue: config.value || '',
- attributes: {
+ attributes: config.attributes || {
"class": 'valueview'
}
});;
@@ -36,6 +37,7 @@ control.registry['textControl'] = textControl;
form.registerControl('view', 'text', textControl, 'textControl');
form.registerControl('edit', 'text', textControl, 'textControl');
form.registerControl('summary', 'text', textControl, 'textControl');
+form.registerControl('summary', 'title', textControl, 'textControl');
form.registerControl('view', 'hidden', textControl, 'textControl');
form.registerControl('edit', 'hidden', textControl, 'textControl');
View
@@ -124,12 +124,12 @@ var listItem = function(config){
"class": view[s].role || ''
}});
this.items.push(controlConfig);
- this.items.push({
- controlValue: itemModel.getValue(this.itemData, s, this.session),
- attributes: {
- "class": view[s].role || ''
- }
- });
+// this.items.push({
+// controlValue: itemModel.getValue(this.itemData, s, this.session),
+// attributes: {
+// "class": view[s].role || ''
+// }
+// });
//}
}
control.call(this);
@@ -4,6 +4,8 @@ var form = require('./form').form;
var rest = require('./../net/rest').utils;
var topbar = function(config){
+ config = config || {};
+ var currentModelName = config.model ? config.model.name : '';
merge(this,{
tag: 'header',
items: [{
@@ -30,7 +32,7 @@ var topbar = function(config){
tag: 'input',
name: 'searchInput',
attributes: {
- placeholder: 'Find a topic...',
+ placeholder: currentModelName ? 'Find a ' + currentModelName + '...' : 'Search...',
cls: 'searchInput'
}
},{
View
@@ -132,6 +132,9 @@ nav{
.sidepanelbutton:first-child{
border-radius: 8px 0px 0px 0px;
+}
+
+.sidepanelbutton.selected{
color: #00F;
background: -moz-linear-gradient(
top,

0 comments on commit 6d43455

Please sign in to comment.