show best practice id's in list

This commit is contained in:
sanj 2011-01-20 13:32:03 +05:30
parent 1971296521
commit 657232f77d
4 changed files with 28 additions and 4 deletions

View File

@ -21,7 +21,7 @@ class BestPractice(ItfModel):
sort_fields = ['title']
def __unicode__(self):
return self.title
return str(self.id) + ": " + self.title
def info_dict(self):
return {

View File

@ -16,6 +16,9 @@ app.launch(function(data) {
app.$body = $('body');
app.$document = $(document);
app.$window = $(window);
app.$window.resize(function() {
ITF.setSizes();
});
/*
app.user = data.user;
app.config = data.config;
@ -35,6 +38,7 @@ app.launch(function(data) {
var wrapper = app.construct.wrapper();
app.$body.css({'opacity': 0});
wrapper.appendTo(app.$body);
ITF.setSizes();
app.$body.animate({
'opacity': 1
}, 2000);

View File

@ -1,12 +1,23 @@
var ITF = {};
ITF.setSizes = function() {
var mp = app.$ui.middlePanel;
var winHeight = parseInt(mp.height());
var winWidth = parseInt($(window).width());
var winWidth = parseInt(mp.width());
var panelHeight = parseInt(winHeight / 3);
var panelWidth = parseInt(winWidth / 3);
mp.size(0, panelHeight);
mp.size(2, panelHeight);
mtp = app.$ui.middleTopPanel;
mmp = app.$ui.middleMiddlePanel;
mbp = app.$ui.middleBottomPanel;
mtp.size(0, panelWidth);
mtp.size(2, panelWidth);
mmp.size(0, panelWidth);
mmp.size(2, panelWidth);
mbp.size(0, panelWidth);
mbp.size(2, panelWidth);
}

View File

@ -50,9 +50,18 @@ Ox.ItfBox = function(options, self) {
if ($additionalButtons.length > 0) {
$additionalButtons.appendTo($buttons);
}
var $maximizeBtn = new Ox.Button({
id: options.id + "Maximize",
style: 'symbol',
title: 'add',
type: 'image',
tooltip: 'Maximize'
}).appendTo($buttons);
var $infoBtn = new Ox.Button({
id: options.id + "InfoBtn",
style: 'symbold',
style: 'symbol',
title: 'info',
type: 'image',
tooltip: 'More info about ' + options.title
@ -95,7 +104,7 @@ Ox.ItfBox = function(options, self) {
var $menuBtn = new Ox.Button({
id: options.id + 'MenuBtn',
style: 'symbol',
title: 'collapse',
title: 'expand',
type: 'image',
tooltip: 'Show Menu'
}).appendTo($buttons);