Skip to content

Commit

Permalink
- Remove .pyc files
Browse files Browse the repository at this point in the history
- Text fields are plain text, and then turn into text field  onclick.
  • Loading branch information
psaavedra committed Mar 14, 2012
1 parent d01c642 commit 78e72f6
Show file tree
Hide file tree
Showing 9 changed files with 70 additions and 12 deletions.
7 changes: 7 additions & 0 deletions README
Expand Up @@ -4,6 +4,13 @@ Setup

TODO


Available settings for settings.py::

HTTP_CACHE_CONTROL = 'max-age=600, must-revalidate'

See more about on http://www.web-caching.com/mnot_tutorial/how.html

Repository
----------

Expand Down
Binary file removed rms/__init__.pyc
Binary file not shown.
Binary file removed rms/admin.pyc
Binary file not shown.
Binary file removed rms/models.pyc
Binary file not shown.
15 changes: 15 additions & 0 deletions rms/static/rms/css/style.css
Expand Up @@ -77,6 +77,21 @@
}


.row1 {
border: 0px !important;
background: none repeat scroll 0 0 #EDF3FE !important;
}

.row2{
border: 0px !important;
background: none repeat scroll 0 0 #FFFFFF !important;
}

input.active, textarea.active{
background: none repeat scroll 0 0 #FFFFFF !important;
border: 1px solid #CCCCCC !important;
}

.clear {
clear: both;
display: block;
Expand Down
32 changes: 25 additions & 7 deletions rms/templates/admin/rms/application/change_form.html
Expand Up @@ -161,6 +161,14 @@ <h2> Categories </h2>

var new_rule_cursor = 0;

function active_input(event) {
$(event.target).addClass("active");
}

function deactive_input(event) {
$(event.target).removeClass("active");
}

function disable_enter_key(event) {

if ( event.which == 13 ) {
Expand Down Expand Up @@ -342,6 +350,11 @@ <h2> Categories </h2>

$(".vTextField").keypress(disable_enter_key);

$(".vTextField").focus(active_input);
$(".vTextField").blur(deactive_input);
$(".vLargeTextField").focus(active_input);
$(".vLargeTextField").blur(deactive_input);

new_rule_cursor = new_rule_cursor + 1;

}
Expand Down Expand Up @@ -379,7 +392,7 @@ <h2> Categories </h2>
' <div class="td noexpand align-left" id="expand-ruledata-' + key_r +'"> </div>' +
' <div class="td">' +
' <input name="rule-' + key_r + '-message" value="' + message + '" ' +
' class="vTextField" maxlength="100" id="rule-' + key_r + '-message" type="text">' +
' class="row1 vTextField" maxlength="100" id="rule-' + key_r + '-message" type="text">' +
' </div>' +
' <div class="td">' +
' <input name="rule-' + key_r + '-slug" value="' + slug + '" ' +
Expand All @@ -388,14 +401,14 @@ <h2> Categories </h2>
' </div>' +
' <div class="td">' +
' <input name="rule-' + key_r + '-weight" value="' + weight + '" ' +
' class="vTextField weight" maxlength="50" id="rule-' + key_r + '-weight" type="text">' +
' class="row1 vTextField weight" maxlength="50" id="rule-' + key_r + '-weight" type="text">' +
' </div>' +
' <div class="td align-right">' +
' <input name="rule-' + key_r + '-DELETE" id="rule-' + key_r + '-DELETE" type="checkbox">' +
' </div>' +
' <div class="ruledata noexpandable" id="expandable-ruledata-' + key_r + '" >' +
' <label class="required" for="id_description">Rule data:</label> ' +
' <textarea class="vLargeTextField rule-ruledata"' +
' <textarea class="row1 vLargeTextField rule-ruledata"' +
' name="rule-' + key_r + '-rule" cols="180" rows="5"' +
' id="rule-' + key_r + '-rule">' +
rule +
Expand All @@ -408,7 +421,7 @@ <h2> Categories </h2>
' <div class="td expand align-left" id="expand-rules-' + key_rk +'"> </div>' +
' <div class="td">' +
' <input name="rulekey-' + key_rk + '-keyname" value="' + keyname + '" ' +
' class="vTextField" maxlength="100" id="rulekey-' + key_rk + '-keyname" type="text">' +
' class="row2 vTextField" maxlength="100" id="rulekey-' + key_rk + '-keyname" type="text">' +
' </div>' +
{# ' <div class="td">' + #}
{# ' <a class="add-rules" id="add-rules-' + key_rk + '" href="#" >' + "Add" + '</a>' + #}
Expand All @@ -435,11 +448,11 @@ <h2> Categories </h2>
' <div class="td expand align-left" id="expand-rulekeys-' + key_cat +'"> </div>' +
' <div class="td">' +
' <input name="category-' + key_cat + '-catname" value="' + catname + '" ' +
' class="vTextField" maxlength="100" id="id_category-' + key_cat + '-catname" type="text">' +
' class="row1 vTextField" maxlength="100" id="id_category-' + key_cat + '-catname" type="text">' +
' </div>' +
' <div class="td">' +
' <input name="category-' + key_cat + '-catid" value="' + catid + '" ' +
' class="vTextField" maxlength="50" id="category-' + key_cat + '-catid" type="text">' +
' class="row1 vTextField" maxlength="50" id="category-' + key_cat + '-catid" type="text">' +
' </div>' +
{# ' <div class="td align-right">' + #}
{# ' <input name="category-' + key_cat + '-DELETE" id="category-' + key_cat + '-DELETE" type="checkbox">' + #}
Expand Down Expand Up @@ -520,7 +533,12 @@ <h2> Categories </h2>

});

$(".vTextField").keypress(disable_enter_key);
$(".vTextField").keypress(disable_enter_key);

$(".vTextField").focus(active_input);
$(".vTextField").focusout(deactive_input);
$(".vLargeTextField").focus(active_input);
$(".vLargeTextField").focusout(deactive_input);

setTimeout(function() { change_deleted_visibility(); }, 2000);

Expand Down
28 changes: 23 additions & 5 deletions rms/templates/admin/rms/application/change_list_results.html
Expand Up @@ -42,6 +42,13 @@ <h2> Applications </h2>
var new_rule_key_cursor = 0;
var new_category_cursor = 0;

function active_input(event) {
$(event.target).addClass("active");
}

function deactive_input(event) {
$(event.target).removeClass("active");
}

function set_update_all_items_action(){
$('select[name=action] option:eq(3)').attr('selected', 'selected');
Expand Down Expand Up @@ -87,7 +94,11 @@ <h2> Applications </h2>
'</li>';

$(new_item).appendTo($('#ul-rulekeys-' + key_cat));

$(".vTextField").keypress(disable_enter_key);

$(".vTextField").focus(active_input);
$(".vTextField").focusout(deactive_input);

new_rule_key_cursor = new_rule_key_cursor + 1;

Expand Down Expand Up @@ -136,7 +147,11 @@ <h2> Applications </h2>

$('#expand-rulekeys-' + key_cat).click(toggle_expandable);
$('#add-rulekeys-' + key_cat).click(add_rule_key);

$(".vTextField").keypress(disable_enter_key);

$(".vTextField").focus(active_input);
$(".vTextField").focusout(deactive_input);

new_category_cursor = new_category_cursor + 1;

Expand Down Expand Up @@ -174,7 +189,7 @@ <h2> Applications </h2>
' <div class="td align-left"> </div>' +
' <div class="td">' +
' <input name="rulekey-' + key_rk + '-keyname" value="' + keyname + '" ' +
' class="vTextField" maxlength="100" id="rulekey-' + key_rk + '-keyname" type="text">' +
' class="row2 vTextField" maxlength="100" id="rulekey-' + key_rk + '-keyname" type="text">' +
' </div>' +
' <div class="td align-right action-checkbox">' +
' <input type="checkbox" name="selected" value="rulekey-' + key_rk + '" class="action-select">' +
Expand All @@ -187,11 +202,11 @@ <h2> Applications </h2>
' <div class="td expand align-left" id="expand-rulekeys-' + key_cat +'"> </div>' +
' <div class="td">' +
' <input name="category-' + key_cat + '-catname" value="' + catname + '" ' +
' class="vTextField" maxlength="100" id="id_category-' + key_cat + '-catname" type="text">' +
' class="row1 vTextField" maxlength="100" id="id_category-' + key_cat + '-catname" type="text">' +
' </div>' +
' <div class="td">' +
' <input name="category-' + key_cat + '-catid" value="' + catid + '" ' +
' class="vTextField" maxlength="50" id="category-' + key_cat + '-catid" type="text">' +
' class="row1 vTextField" maxlength="50" id="category-' + key_cat + '-catid" type="text">' +
' </div>' +
{# ' <div class="td">' + #}
{# ' <a class="add-rulekeys" id="add-rulekeys-' + key_cat + '" href="#" >' + "Add" + '</a>' + #}
Expand Down Expand Up @@ -227,12 +242,12 @@ <h2> Applications </h2>
' </div>' +
' <div class="td">' +
' <input name="application-' + key_app + '-appname" value="' + appname + '" ' +
' class="vTextField" maxlength="100" id="id_application-' + key_app + '-appname" type="text">' +
' class="row2 vTextField" maxlength="100" id="id_application-' + key_app + '-appname" type="text">' +
' <a class="" href="/admin/rms/application/' + key_app + '" >' + "View" + '</a>' +
' </div>' +
' <div class="td">' +
' <input name="application-' + key_app + '-appid" value="' + appid + '" ' +
' class="vTextField" maxlength="50" id="application-' + key_app + '-appid" type="text">' +
' class="row2 vTextField" maxlength="50" id="application-' + key_app + '-appid" type="text">' +
' </div>' +
' <div class="td">' +
' <input type="file" id="application-' + key_app + '-icon" name="application-' + key_app + '-icon"> ' +
Expand Down Expand Up @@ -291,6 +306,9 @@ <h2> Applications </h2>

$(".vTextField").keypress(disable_enter_key);

$(".vTextField").focus(active_input);
$(".vTextField").focusout(deactive_input);

$("#save-button").click(set_update_all_items_action);

collapse();
Expand Down
Binary file removed rms/urls.pyc
Binary file not shown.
Binary file removed rms/views.pyc
Binary file not shown.

0 comments on commit 78e72f6

Please sign in to comment.