Permalink
Browse files

Fixed indentation

  • Loading branch information...
1 parent 618e15f commit 73e086da1426e31185f4bc0f53bdf893ab694c38 fab committed Apr 4, 2012
Showing with 13 additions and 13 deletions.
  1. +8 −8 drink/static/base.js
  2. +5 −5 drink/static/main.js
View
@@ -20,7 +20,7 @@ var Drink = function() {
if ( typeof(id) !== "string") {
// assume it's a jquery <li> entry
var id = id.data('item');
- }
+ }
return me.entries.filter(function(e) {return e.id === id})[0];
};
// page switcher
@@ -30,10 +30,10 @@ var Drink = function() {
var obj = obj;
var view = view;
var loader = me.d.loaders[view];
-
+
if (!!me.cur_action)
$('#main_body , #footers').fadeOut();
-
+
if ( obj || action_to_take !== me.cur_action)
setTimeout(function() {
if(!!!view)
@@ -76,7 +76,7 @@ var Drink = function() {
});
}, 300);
};
-
+
// XXX: change this to another place, in Entry ?
this.get_from_factory = function(which, what) {
var val = me.d[which+'_factory'][what];
@@ -94,14 +94,14 @@ var Drink = function() {
var e = new Entry(data);
me.entries.push( e );
me.d.items.push( data );
-
+
if (!!focus) e.elt.center();
me.call_hook('add', e);
};
// self factory shortcuts
this.write_footers = function() {
var foot = $('#footers');
- // add comments
+ // add comments
if (me.d._perm.match(/r/)) {
if(debug) console.log('comments & rates...');
if (me.i_like) {
@@ -148,10 +148,10 @@ var Drink = function() {
$.post(base_path+'struct', {'childs': true, 'full': true})
.success(function(data, status, req) {
if(debug) console.log(data);
- me.d = data;
+ me.d = data;
if (!data._perm) return;
me.entries = $.map(me.d.items, function(i) { return new Entry(i); });
- // load actions
+ // load actions
ui.load_action_list(data.actions);
me.i_like = data.i_like;
setTimeout(me.write_footers, 300);
View
@@ -111,7 +111,7 @@ ui = new Object({
ask_user: function(title, msg, callback) {
return ui.dialog('<div title="'+title+'">'+msg+'<form id="drink_question" action="js: return false" onvalidate="return false;"><input type="text" id="drink_answer" name="question"></input></form></div>', {
Ok: function() {
- $( this ).dialog( "close" );
+ $( this ).dialog( "close" );
callback($(this).find('input').val());
}
});
@@ -322,7 +322,7 @@ function dom_initialize(dom) {
});
// autocomplete paths
dom.find('input.completable[complete_type=objpath]').autocomplete({source:get_matching_elts});
-
+
// change style of checkboxes titles in editable spans form
dom.find('.editable span').click( function() {
var o = $(this).prev();
@@ -379,7 +379,7 @@ function dom_initialize(dom) {
dom.find(".autovalidate").each(function(index, ob) { $(ob).validate(); } );
dom.find('.auto_date').datepicker({dateFormat: "dd/mm/yy"});
-
+
main_list = dom.find('#main_list');
if (!!!main_list) {
main_list = dom.find('.sortable');
@@ -428,7 +428,7 @@ function get_matching_elts(req, callback) {
}
var cur_path = path_elt;
// AJAX URL
-
+
$.get(url).success(function(data) { callback(data.items); } );
}
@@ -506,7 +506,7 @@ $(document).ready(function(){
});
$('#header_bar').on('dblclick', function() { $('#header_bar').fadeOut('slow'); });
-
+
drink = new Drink();
// end of statup code

0 comments on commit 73e086d

Please sign in to comment.