Skip to content

Commit

Permalink
Bulk of work on renaming project from Lodo to Dodo. Project has been …
Browse files Browse the repository at this point in the history
…verified to still work, but there are probably a bunch of lurking bugs here and there.
  • Loading branch information
Axel Liljencrantz committed Oct 20, 2010
1 parent 0169728 commit 73f0521
Show file tree
Hide file tree
Showing 21 changed files with 108 additions and 108 deletions.
6 changes: 3 additions & 3 deletions app/views/bills/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
/*
Use an object as a fake namespace. Spiffy.
*/
var LODO = new Object();
LODO.orderList = <%= raw(@orders_all.all.to_json(
var DODO = new Object();
DODO.orderList = <%= raw(@orders_all.all.to_json(
:include => {:company => {},
:customer => {},
:seller => {},
:transport => {},
:order_items => {:include => :product}}))
%>;
LODO.billItemList = <%= raw(@bill.bill_orders.to_json(
DODO.billItemList = <%= raw(@bill.bill_orders.to_json(
:include => :bill_items)) %>;
</script>

Expand Down
10 changes: 5 additions & 5 deletions app/views/journals/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
/*
Use an object as a fake namespace. Spiffy.
*/
var LODO = new Object();
LODO.unitList = <%= raw(@units_all.all.to_json) %>;
LODO.projectList = <%= raw(@projects_all.all.to_json) %>;
LODO.accountList = <%= raw(@accounts_all.all.to_json :include => { :vat_account => {:include => { :vat_account_periods =>{}, :target_account=>{}}} }) %>;
LODO.journalOperationList = <%= raw(@journal.journal_operations.all.to_json) %>;
var DODO = new Object();
DODO.unitList = <%= raw(@units_all.all.to_json) %>;
DODO.projectList = <%= raw(@projects_all.all.to_json) %>;
DODO.accountList = <%= raw(@accounts_all.all.to_json :include => { :vat_account => {:include => { :vat_account_periods =>{}, :target_account=>{}}} }) %>;
DODO.journalOperationList = <%= raw(@journal.journal_operations.all.to_json) %>;
</script>

<%= form_for(@journal) do |f| %>
Expand Down
4 changes: 2 additions & 2 deletions app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
<title>LODO</title>
<title>DODO</title>
<%= stylesheet_link_tag 'datepicker' %>
<%= stylesheet_link_tag 'journals' %>
<%= stylesheet_link_tag 'lodo' %>
<%= stylesheet_link_tag 'dodo' %>
<%= javascript_include_tag :all %>
</head>
<body>
Expand Down
6 changes: 3 additions & 3 deletions app/views/orders/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
/*
Use an object as a fake namespace. Spiffy.
*/
var LODO = new Object();
LODO.productList = <%= raw(@products_all.to_json) %>;
LODO.orderItemList = <%= raw(@order.order_items.to_json) %>;
var DODO = new Object();
DODO.productList = <%= raw(@products_all.to_json) %>;
DODO.orderItemList = <%= raw(@order.order_items.to_json) %>;
</script>

<div>Note: All amounts are ex. VAT.</div>
Expand Down
2 changes: 1 addition & 1 deletion config.ru
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This file is used by Rack-based servers to start the application.

require ::File.expand_path('../config/environment', __FILE__)
run Lodo::Application
run Dodo::Application
4 changes: 2 additions & 2 deletions config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# you've limited to :test, :development, or :production.
Bundler.require(:default, Rails.env) if defined?(Bundler)

module Lodo
module Dodo
class Application < Rails::Application
# Settings in config/environments/* take precedence over those specified here.
# Application configuration should go into files in config/initializers
Expand Down Expand Up @@ -56,7 +56,7 @@ class Application < Rails::Application
# Make sure the secret is at least 30 characters and all random,
# no regular words or you'll be exposed to dictionary attacks.
config.action_dispatch.session = {
:session_key => '_lodo3_session',
:session_key => '_dodo3_session',
:secret => '29e52c8e64c464b41e52b98c9cceb4e43d1d8870df42124cd96be3c4004179720c0326431b0126f1f27d9c65bd834d1028c8f745ddcc8484e32ff0ac3e7d75fa'
}

Expand Down
2 changes: 1 addition & 1 deletion config/environment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
require File.expand_path('../application', __FILE__)

# Initialize the rails application
Lodo::Application.initialize!
Dodo::Application.initialize!
2 changes: 1 addition & 1 deletion config/environments/development.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Lodo::Application.configure do
Dodo::Application.configure do
# Settings specified here will take precedence over those in config/environment.rb

# log deprecation warnings
Expand Down
2 changes: 1 addition & 1 deletion config/environments/production.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Lodo::Application.configure do
Dodo::Application.configure do
# Settings specified here will take precedence over those in config/environment.rb

# The production environment is meant for finished, "live" apps.
Expand Down
2 changes: 1 addition & 1 deletion config/environments/test.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Lodo::Application.configure do
Dodo::Application.configure do
# Settings specified here will take precedence over those in config/environment.rb

# The test environment is used exclusively to run your application's
Expand Down
2 changes: 1 addition & 1 deletion config/initializers/session_store.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Be sure to restart your server when you modify this file.

Rails.application.config.session_store :cookie_store, :key => '_lodo_session'
Rails.application.config.session_store :cookie_store, :key => '_dodo_session'

# Use the database for sessions instead of the cookie-based default,
# which shouldn't be used to store highly confidential information
Expand Down
2 changes: 1 addition & 1 deletion config/routes.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Lodo::Application.routes.draw do |map|
Dodo::Application.routes.draw do |map|
resources :paycheck_lines
resources :paychecks

Expand Down
File renamed without changes.
File renamed without changes
24 changes: 12 additions & 12 deletions public/javascripts/bills.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,9 @@ var bills = {
sel.name = bills.getCurrentLineName('#bill') + "[order_id]";
sel.line_id = bills.getCurrentLineId('#bill')

for (var i=0; i<LODO.orderList.length; i++) {
sel.add(new Option("" + LODO.orderList[i].order.customer.name + " - " + LODO.orderList[i].order.order_date + " - #" + LODO.orderList[i].order.id,
LODO.orderList[i].order.id), null);
for (var i=0; i<DODO.orderList.length; i++) {
sel.add(new Option("" + DODO.orderList[i].order.customer.name + " - " + DODO.orderList[i].order.order_date + " - #" + DODO.orderList[i].order.id,
DODO.orderList[i].order.id), null);
}
sel.value = bill_order && bill_order.order_id;

Expand All @@ -200,18 +200,18 @@ var bills = {
"order_template");

res.updateProducts = function (order_id, bill_items) {
order_nr = LODO.orderDict[order_id];
res.discount = LODO.orderList[order_nr].order.price / sum(map(function (x) { return x.price; }, LODO.orderList[order_nr].order.order_items));
order_nr = DODO.orderDict[order_id];
res.discount = DODO.orderList[order_nr].order.price / sum(map(function (x) { return x.price; }, DODO.orderList[order_nr].order.order_items));
res.table_lines = 0;

var rows = bills.getRowList(res);
while (rows.rows.length)
rows.deleteRow(0);

$.each(
LODO.orderList[order_nr].order.order_items,
DODO.orderList[order_nr].order.order_items,
function () {
var product_line = {price: LODO.orderList[order_nr].order.price * res.discount,
var product_line = {price: DODO.orderList[order_nr].order.price * res.discount,
amount: this.amount,
discount: 0.0,
order_item: this}
Expand Down Expand Up @@ -256,12 +256,12 @@ var bills = {
$('#bill')[0].table_lines = 0;
$('#bill')[0].name = 'bill';

LODO.orderDict = Array();
for (var pos = 0; pos < LODO.orderList.length; pos++)
LODO.orderDict[LODO.orderList[pos].order.id] = pos;
DODO.orderDict = Array();
for (var pos = 0; pos < DODO.orderList.length; pos++)
DODO.orderDict[DODO.orderList[pos].order.id] = pos;

for (var i=0; i<LODO.billItemList.length; i++) {
bills.addOrder(LODO.billItemList[i].bill_order);
for (var i=0; i<DODO.billItemList.length; i++) {
bills.addOrder(DODO.billItemList[i].bill_order);
}

bills.validate();
Expand Down
File renamed without changes.
Loading

0 comments on commit 73f0521

Please sign in to comment.