Skip to content
Browse files

Fixed bug in - Complex dynamic rows

  • Loading branch information...
1 parent c2cafc3 commit 343778db0e6008b05176124390fbcc65a893c13e @erikuus committed Oct 4, 2011
View
30 css/form.css
@@ -161,7 +161,7 @@ select
input.autocomplete
{
- background: #FFFFE0;
+ background: #FFFFE0;
}
input.readonly
@@ -222,29 +222,29 @@ div.errorMessage
color: #C00;
}
-label.error
+label.error
{
- display: block;
+ display: block;
}
div.add
{
- cursor: pointer;
- width: 60px;
- padding: 2px;
- border: 1px solid #a6c9e2;
- color: #0066a7;
- text-align: center;
+ cursor: pointer;
+ width: 60px;
+ padding: 2px;
+ border: 1px solid #a6c9e2;
+ color: #0066a7;
+ text-align: center;
}
div.remove
{
- cursor: pointer;
- width: 60px;
- padding: 2px;
- border: 1px solid #a6c9e2;
- color: #0066a7;
- text-align: center;
+ cursor: pointer;
+ width: 60px;
+ padding: 2px;
+ border: 1px solid #a6c9e2;
+ color: #0066a7;
+ text-align: center;
}
textarea.template
View
14 js/jquery.calculation.min.js
@@ -0,0 +1,14 @@
+/*
+ * jQuery Calculation Plug-in
+ *
+ * Copyright (c) 2007 Dan G. Switzer, II
+ *
+ * Dual licensed under the MIT and GPL licenses:
+ * http://www.opensource.org/licenses/mit-license.php
+ * http://www.gnu.org/licenses/gpl.html
+ *
+ * Revision: 12
+ * Version: 0.4.08
+ *
+*/
+(function($){var defaults={reNumbers:/(-|-\$)?(\d+(,\d{3})*(\.\d{1,})?|\.\d{1,})/g,cleanseNumber:function(v){return v.replace(/[^0-9.\-]/g,"")},useFieldPlugin:(!!$.fn.getValue),onParseError:null,onParseClear:null};$.Calculation={version:"0.4.08",setDefaults:function(options){$.extend(defaults,options)}};$.fn.parseNumber=function(options){var aValues=[];options=$.extend(options,defaults);this.each(function(){var $el=$(this),sMethod=($el.is(":input")?(defaults.useFieldPlugin?"getValue":"val"):"text"),v=$.trim($el[sMethod]()).match(defaults.reNumbers,"");if(v==null){v=0;if(jQuery.isFunction(options.onParseError))options.onParseError.apply($el,[sMethod]);$.data($el[0],"calcParseError",true)}else{v=options.cleanseNumber.apply(this,[v[0]]);if($.data($el[0],"calcParseError")&&jQuery.isFunction(options.onParseClear)){options.onParseClear.apply($el,[sMethod]);$.data($el[0],"calcParseError",false)}}aValues.push(parseFloat(v,10))});return aValues};$.fn.calc=function(expr,vars,cbFormat,cbDone){var $this=this,exprValue="",precision=0,$el,parsedVars={},tmp,sMethod,_,bIsError=false;for(var k in vars){expr=expr.replace((new RegExp("("+k+")","g")),"_.$1");if(!!vars[k]&&!!vars[k].jquery){parsedVars[k]=vars[k].parseNumber()}else{parsedVars[k]=vars[k]}}this.each(function(i,el){var p,len;$el=$(this);sMethod=($el.is(":input")?(defaults.useFieldPlugin?"setValue":"val"):"text");_={};for(var k in parsedVars){if(typeof parsedVars[k]=="number"){_[k]=parsedVars[k]}else if(typeof parsedVars[k]=="string"){_[k]=parseFloat(parsedVars[k],10)}else if(!!parsedVars[k]&&(parsedVars[k]instanceof Array)){tmp=(parsedVars[k].length==$this.length)?i:0;_[k]=parsedVars[k][tmp]}if(isNaN(_[k]))_[k]=0;p=_[k].toString().match(/\.\d+$/gi);len=(p)?p[0].length-1:0;if(len>precision)precision=len}try{exprValue=eval(expr);if(precision)exprValue=Number(exprValue.toFixed(Math.max(precision,4)));if(jQuery.isFunction(cbFormat)){var tmp=cbFormat.apply(this,[exprValue]);if(!!tmp)exprValue=tmp}}catch(e){exprValue=e;bIsError=true}$el[sMethod](exprValue.toString())});if(jQuery.isFunction(cbDone))cbDone.apply(this,[this]);return this};$.each(["sum","avg","min","max"],function(i,method){$.fn[method]=function(bind,selector){if(arguments.length==0)return math[method](this.parseNumber());var bSelOpt=selector&&(selector.constructor==Object)&&!(selector instanceof jQuery);var opt=bind&&bind.constructor==Object?bind:{bind:bind||"keyup",selector:(!bSelOpt)?selector:null,oncalc:null};if(bSelOpt)opt=jQuery.extend(opt,selector);if(!!opt.selector)opt.selector=$(opt.selector);var self=this,sMethod,doCalc=function(){var value=math[method](self.parseNumber(opt));if(!!opt.selector){sMethod=(opt.selector.is(":input")?(defaults.useFieldPlugin?"setValue":"val"):"text");opt.selector[sMethod](value.toString())}if(jQuery.isFunction(opt.oncalc))opt.oncalc.apply(self,[value,opt])};doCalc();return self.bind(opt.bind,doCalc)}});var math={sum:function(a){var total=0,precision=0;$.each(a,function(i,v){var p=v.toString().match(/\.\d+$/gi),len=(p)?p[0].length-1:0;if(len>precision)precision=len;total+=v});if(precision)total=Number(total.toFixed(precision));return total},avg:function(a){return math.sum(a)/a.length},min:function(a){return Math.min.apply(Math,a)},max:function(a){return Math.max.apply(Math,a)}}})(jQuery);
View
24 js/template.js
@@ -1,31 +1,31 @@
/**
* jQuery script for adding new content from template field
- *
+ *
* NOTE!
* This script depends on jquery.format.js
- *
- * IMPORTANT!
+ *
+ * IMPORTANT!
* Do not change anything except specific commands!
*/
-jQuery(document).ready(function(){
- removeEmptyHeads();
+jQuery(document).ready(function(){
+ hideEmptyHeaders();
$(".add").click(function(){
var template = jQuery.format(jQuery.trim($(this).siblings(".template").val()));
var place = $(this).parents(".templateFrame:first").children(".templateTarget");
- var i = place.children(".templateContent").size();
+ var i = place.find(".rowIndex").length>0 ? place.find(".rowIndex").max()+1 : 0;
$(template(i)).appendTo(place);
place.siblings('.templateHead').show()
// start specific commands
-
+
// end specific commands
- });
-
- $(".remove").live("click", function() {
+ });
+
+ $(".remove").live("click", function() {
$(this).parents(".templateContent:first").remove();
- removeEmptyHeads();
+ hideEmptyHeaders();
});
});
-function removeEmptyHeads(){
+function hideEmptyHeaders(){
$('.templateTarget').filter(function(){return $.trim($(this).text())===''}).siblings('.templateHead').hide();
}
View
416 protected/messages/et/ui.php
@@ -19,212 +19,212 @@
* @version $Id: $
*/
return array (
-'Accordion' => '',
-'Action menu' => '',
-'Alpha pagination' => '',
-'Are you sure to delete this item and its subitems?' => '',
-'Authorid' => '',
-'Autocomplete new' => '',
-'Autocomplete old' => '',
-'Batch menu' => '',
-'Breadcrumbs' => '',
-'Button' => '',
-'Call Code' => '',
-'Century' => '',
-'Century range' => '',
-'Charts' => '',
-'Checkbox panels' => '',
-'Click to Edit' => '',
-'Click to edit' => '',
-'Code' => '',
-'Complex dynamic rows' => '',
-'Content' => '',
-'Createtime' => '',
-'Data Widgets' => '',
-'Date' => '',
-'Datepicker' => '',
-'Detail view' => '',
-'Dialog' => '',
-'Display classificator' => '',
-'Display text' => '',
-'Draggable' => '',
-'Dropdown classificators' => '',
-'Dropdown menu' => '',
-'Droppable' => '',
-'Dynamic rows' => '',
-'Error' => '',
-'Ex 1: No data from database, default map data' => '',
-'Ex 1: Text-only' => '',
-'Ex 2: Map and rectangle data from database' => '',
-'Ex 2: Text-only & show active' => '',
-'Ex 3: Icons before' => '',
-'Ex 3: Rectangle data from database, auto adjust map' => '',
-'Ex 4: Icons after & show active' => '',
-'Explain something' => '',
-'Extensions' => '',
-'Form Widgets' => '',
-'Form design' => '',
-'Form input' => '',
-'Google Map Input' => '',
-'Grid view' => '',
-'Gridview with classificators' => '',
-'Group A' => '',
-'Group B' => '',
-'Hello' => '',
-'Horizontal Bar Chart' => '',
-'ID' => '',
-'Input' => '',
-'Input map' => '',
-'Items from database' => '',
-'Label' => '',
-'Lang menu' => '',
-'Line Chart' => '',
-'List Builder' => '',
-'List builder' => '',
-'List view' => '',
-'Manage Menus' => '',
-'Masked textfield' => '',
-'Menu' => '',
-'Menus' => '',
-'Modal Dialog' => '',
-'Modules' => '',
-'Multilevel menu' => '',
-'Multiple file upload' => '',
-'NE Latitude' => '',
-'NE Longitude' => '',
-'New Menu' => '',
-'No, delete this item only' => '',
-'Not really an extension, but simple jquery trick based on HTML layout.' => '',
-'Parent' => '',
-'Pie Chart' => '',
-'Popup text (for xwebapp sceleton only)' => '',
-'Position' => '',
-'Progressbar' => '',
-'Radio panels' => '',
-'Read only' => '',
-'Resizable' => '',
-'SW Latitude' => '',
-'SW Longitude' => '',
-'Select form hierarchy' => '',
-'Select in chain' => '',
-'Select multiple' => '',
-'Select panels' => '',
-'Select single' => '',
-'Selectable' => '',
-'Slider' => '',
-'Slider & SliderInput' => '',
-'Sortable' => '',
-'Star rating' => '',
-'Static Google Map' => '',
-'Static items' => '',
-'Static map' => '',
-'Tabs advanced' => '',
-'Tabs simple' => '',
-'Title' => '',
-'Toggle content' => '',
-'Tree' => '',
-'Tree Ajax from Database' => '',
-'Tree from Database' => '',
-'Tree view' => '',
-'UI Interactions' => '',
-'UI Widgets' => '',
-'Update Menu' => '',
-'Updatetime' => '',
-'Vertical Bar Chart' => '',
-'Vertical Grouped Bar Chart' => '',
-'Vertical Stacked Bar Chart' => '',
-'View Menu' => '',
-'WYSIWYG Editor' => '',
-'WYSIWYG editor' => '',
-'Widgets' => '',
-'Year' => '',
-'Year range' => '',
-'Zoom' => '',
-'-add-' => '-lisa-',
-'Access denied' => 'Juurdepääs keelatud',
-'An internal error occurred while the Web server was processing your request.' => 'Ilmnes serveri sisemine viga.',
-'Are you sure to delete this item?' => 'Kas olete kindel, et soovite kustutada selle rea?',
-'Are you sure to perform this action on checked items?' => 'Kas olete kindel, et soovite rakendada seda käsku märgitud ridadele?',
-'Back' => 'Tagasi',
-'Bad Request' => 'Vigane päring',
-'Birth' => 'Sünd',
-'Body' => 'Sisu',
-'Browse code' => 'Vaata lisaks',
-'Cancel' => 'Loobu',
-'Classificators' => 'Klassifikaatorid',
-'Collapse All' => 'Sulge puu',
-'Configuration' => 'Konfiguratsioon',
-'Contact' => 'Tagasiside',
-'Contact for more information' => 'Kui soovid rohkem informatsiooni, palun võta ühendust',
-'Countries' => 'Riigid',
-'Country' => 'Riik',
-'Create' => 'Salvesta',
-'Data successfully saved!' => 'Andmed salvestatud!',
-'Delete' => 'Kustuta',
-'Email' => 'E-post',
-'English' => 'Inglise keel',
-'Estonian' => 'Eesti keel',
-'Expand All' => 'Ava puu',
-'Eyecolor' => 'Silmade värv',
-'Fields with {mark} are required' => '{mark}-ga märgitud väljad on kohustuslikud',
-'Finnish' => 'Soome keel',
-'Firstname' => 'Eesnimi',
-'Gender' => 'Sugu',
-'German' => 'Saksa keel',
-'Help' => 'Abi',
-'Helps' => 'Abitekstid',
-'Home' => 'Avaleht',
-'If you have questions, please fill out the following form to contact us. Thank you.' => 'Selle vormi kaudu saate teatada süsteemist leitud vigadest, kasutamisel ilmnenud probleemidest, ettepanekutest jmt. Oleme tänulikud igasuguse tagasiside eest!',
-'If you think this is a server error, please contact' => 'Kui Sa arvad, et see on programmi viga, palun võta ühendust',
-'Imported functions' => 'Import funktsionaalsus',
-'Internal Server Error' => 'Serveri viga',
-'Lastname' => 'Perenimi',
-'Login' => 'Sisene',
-'Logout' => 'Välju',
-'Make selected persons 1 year older' => 'Tee valitud isikud 1 aasta vanemaks ',
-'Make selected persons 1 year younger' => 'Tee valitud isikud 1 aasta nooremaks',
-'Manage' => 'Halda',
-'Manage Persons' => 'Halda isikuid - Grid view',
-'NB! Access restricted by IP' => 'NB! Toimib ainult sisevõrgus',
-'Name' => 'Nimi',
-'New' => 'Lisa',
-'New Person' => 'Uus isik',
-'Our system is currently under maintenance. Please come back later.' => 'Meie süsteem on hooldustöödeks suletud. Proovi varsti uuesti.',
-'Page Not Found' => 'Lehekülge ei leitud',
-'Password' => 'Salasõna',
-'Password is incorrect' => 'Vale salasõna',
-'Persons' => 'Isikud',
-'Please check items you would like to perform this action on!' => 'Palun märgista read, millele soovite rakendada seda käsku!',
-'Please contact' => 'Palun võta ühendust',
-'Please do not repeat the request without modifications.' => 'Palun ära korda seda päringut.',
-'Please enter the letters as they are shown in the image above.' => 'Palun kirjutage turvakood kõrvalolevasse kasti.',
-'Please make sure you entered a correct URL.' => 'Palun kontrolli aadressi korrektsust.',
-'Read more' => 'Täpsem info',
-'Registered' => 'Registreerunud',
-'Remember me next time' => 'Jäta mind meelde',
-'Remove' => 'Eemalda',
-'Return to homepage' => 'Pöördu tagasi avalehele',
-'Russian' => 'Vene keel',
-'Save' => 'Salvesta muudatused',
-'Search' => 'Otsi',
-'Select form calendar' => 'Vali kalendrist',
-'Service Unavailable' => 'Teenus pole saadaval',
-'Spanish' => 'Hispaania keel',
-'Subject' => 'Pealkiri',
-'Submit' => 'Saada',
-'Thank you for contacting us. We will respond to you as soon as possible.' => 'Täname Teid tagasiside eest. Vastame Teile esimesel võimalusel.',
-'These fields will be filled automatically after you select country' => 'Need väljad täidetakse automaatselt, kui valid riigi',
-'Unauthorized' => 'Autoriseerimata',
-'Update' => 'Muuda',
-'Update Person' => 'Muuda isikut',
-'Upload' => 'Lae üles',
-'Username' => 'Kasutajanimi',
-'Username is incorrect' => 'Vale kasutajanimi',
-'Verification Code' => 'Turvakood',
-'View Person' => 'Vaata isikut - Detail view',
-'View code' => 'Vaata koodi',
-'Webpage' => 'Veebileht',
-'Yes' => 'Jah',
-'You are not allowed to perform this action.' => 'Sul pole lubatud seda tegevust sooritada.',
-'You do not have the proper credential to access this page.' => 'Sul ei ole piisavalt õigusi sellele leheküljele sisenemiseks.',
+ 'Accordion' => '',
+ 'Action menu' => '',
+ 'Alpha pagination' => '',
+ 'Are you sure to delete this item and its subitems?' => '',
+ 'Authorid' => '',
+ 'Autocomplete new' => '',
+ 'Autocomplete old' => '',
+ 'Batch menu' => '',
+ 'Breadcrumbs' => '',
+ 'Button' => '',
+ 'Call Code' => '',
+ 'Century' => '',
+ 'Century range' => '',
+ 'Charts' => '',
+ 'Checkbox panels' => '',
+ 'Click to Edit' => '',
+ 'Click to edit' => '',
+ 'Code' => '',
+ 'Complex dynamic rows' => '',
+ 'Content' => '',
+ 'Createtime' => '',
+ 'Data Widgets' => '',
+ 'Date' => '',
+ 'Datepicker' => '',
+ 'Detail view' => '',
+ 'Dialog' => '',
+ 'Display classificator' => '',
+ 'Display text' => '',
+ 'Draggable' => '',
+ 'Dropdown classificators' => '',
+ 'Dropdown menu' => '',
+ 'Droppable' => '',
+ 'Dynamic rows' => '',
+ 'Error' => '',
+ 'Ex 1: No data from database, default map data' => '',
+ 'Ex 1: Text-only' => '',
+ 'Ex 2: Map and rectangle data from database' => '',
+ 'Ex 2: Text-only & show active' => '',
+ 'Ex 3: Icons before' => '',
+ 'Ex 3: Rectangle data from database, auto adjust map' => '',
+ 'Ex 4: Icons after & show active' => '',
+ 'Explain something' => '',
+ 'Extensions' => '',
+ 'Form Widgets' => '',
+ 'Form design' => '',
+ 'Form input' => '',
+ 'Google Map Input' => '',
+ 'Grid view' => '',
+ 'Gridview with classificators' => '',
+ 'Group A' => '',
+ 'Group B' => '',
+ 'Hello' => '',
+ 'Horizontal Bar Chart' => '',
+ 'ID' => '',
+ 'Input' => '',
+ 'Input map' => '',
+ 'Items from database' => '',
+ 'Label' => '',
+ 'Lang menu' => '',
+ 'Line Chart' => '',
+ 'List Builder' => '',
+ 'List builder' => '',
+ 'List view' => '',
+ 'Manage Menus' => '',
+ 'Masked textfield' => '',
+ 'Menu' => '',
+ 'Menus' => '',
+ 'Modal Dialog' => '',
+ 'Modules' => '',
+ 'Multilevel menu' => '',
+ 'Multiple file upload' => '',
+ 'NE Latitude' => '',
+ 'NE Longitude' => '',
+ 'New Menu' => '',
+ 'No, delete this item only' => '',
+ 'Not really an extension, but simple jquery trick based on HTML layout.' => '',
+ 'Parent' => '',
+ 'Pie Chart' => '',
+ 'Popup text (for xwebapp sceleton only)' => '',
+ 'Position' => '',
+ 'Progressbar' => '',
+ 'Radio panels' => '',
+ 'Read only' => '',
+ 'Resizable' => '',
+ 'SW Latitude' => '',
+ 'SW Longitude' => '',
+ 'Select form hierarchy' => '',
+ 'Select in chain' => '',
+ 'Select multiple' => '',
+ 'Select panels' => '',
+ 'Select single' => '',
+ 'Selectable' => '',
+ 'Slider' => '',
+ 'Slider & SliderInput' => '',
+ 'Sortable' => '',
+ 'Star rating' => '',
+ 'Static Google Map' => '',
+ 'Static items' => '',
+ 'Static map' => '',
+ 'Tabs advanced' => '',
+ 'Tabs simple' => '',
+ 'Title' => '',
+ 'Toggle content' => '',
+ 'Tree' => '',
+ 'Tree Ajax from Database' => '',
+ 'Tree from Database' => '',
+ 'Tree view' => '',
+ 'UI Interactions' => '',
+ 'UI Widgets' => '',
+ 'Update Menu' => '',
+ 'Updatetime' => '',
+ 'Vertical Bar Chart' => '',
+ 'Vertical Grouped Bar Chart' => '',
+ 'Vertical Stacked Bar Chart' => '',
+ 'View Menu' => '',
+ 'WYSIWYG Editor' => '',
+ 'WYSIWYG editor' => '',
+ 'Widgets' => '',
+ 'Year' => '',
+ 'Year range' => '',
+ 'Zoom' => '',
+ '-add-' => '-lisa-',
+ 'Access denied' => 'Juurdepääs keelatud',
+ 'An internal error occurred while the Web server was processing your request.' => 'Ilmnes serveri sisemine viga.',
+ 'Are you sure to delete this item?' => 'Kas olete kindel, et soovite kustutada selle rea?',
+ 'Are you sure to perform this action on checked items?' => 'Kas olete kindel, et soovite rakendada seda käsku märgitud ridadele?',
+ 'Back' => 'Tagasi',
+ 'Bad Request' => 'Vigane päring',
+ 'Birth' => 'Sünd',
+ 'Body' => 'Sisu',
+ 'Browse code' => 'Vaata lisaks',
+ 'Cancel' => 'Loobu',
+ 'Classificators' => 'Klassifikaatorid',
+ 'Collapse All' => 'Sulge puu',
+ 'Configuration' => 'Konfiguratsioon',
+ 'Contact' => 'Tagasiside',
+ 'Contact for more information' => 'Kui soovid rohkem informatsiooni, palun võta ühendust',
+ 'Countries' => 'Riigid',
+ 'Country' => 'Riik',
+ 'Create' => 'Salvesta',
+ 'Data successfully saved!' => 'Andmed salvestatud!',
+ 'Delete' => 'Kustuta',
+ 'Email' => 'E-post',
+ 'English' => 'Inglise keel',
+ 'Estonian' => 'Eesti keel',
+ 'Expand All' => 'Ava puu',
+ 'Eyecolor' => 'Silmade värv',
+ 'Fields with {mark} are required' => '{mark}-ga märgitud väljad on kohustuslikud',
+ 'Finnish' => 'Soome keel',
+ 'Firstname' => 'Eesnimi',
+ 'Gender' => 'Sugu',
+ 'German' => 'Saksa keel',
+ 'Help' => 'Abi',
+ 'Helps' => 'Abitekstid',
+ 'Home' => 'Avaleht',
+ 'If you have questions, please fill out the following form to contact us. Thank you.' => 'Selle vormi kaudu saate teatada süsteemist leitud vigadest, kasutamisel ilmnenud probleemidest, ettepanekutest jmt. Oleme tänulikud igasuguse tagasiside eest!',
+ 'If you think this is a server error, please contact' => 'Kui Sa arvad, et see on programmi viga, palun võta ühendust',
+ 'Imported functions' => 'Import funktsionaalsus',
+ 'Internal Server Error' => 'Serveri viga',
+ 'Lastname' => 'Perenimi',
+ 'Login' => 'Sisene',
+ 'Logout' => 'Välju',
+ 'Make selected persons 1 year older' => 'Tee valitud isikud 1 aasta vanemaks ',
+ 'Make selected persons 1 year younger' => 'Tee valitud isikud 1 aasta nooremaks',
+ 'Manage' => 'Halda',
+ 'Manage Persons' => 'Halda isikuid - Grid view',
+ 'NB! Access restricted by IP' => 'NB! Toimib ainult sisevõrgus',
+ 'Name' => 'Nimi',
+ 'New' => 'Lisa',
+ 'New Person' => 'Uus isik',
+ 'Our system is currently under maintenance. Please come back later.' => 'Meie süsteem on hooldustöödeks suletud. Proovi varsti uuesti.',
+ 'Page Not Found' => 'Lehekülge ei leitud',
+ 'Password' => 'Salasõna',
+ 'Password is incorrect' => 'Vale salasõna',
+ 'Persons' => 'Isikud',
+ 'Please check items you would like to perform this action on!' => 'Palun märgista read, millele soovite rakendada seda käsku!',
+ 'Please contact' => 'Palun võta ühendust',
+ 'Please do not repeat the request without modifications.' => 'Palun ära korda seda päringut.',
+ 'Please enter the letters as they are shown in the image above.' => 'Palun kirjutage turvakood kõrvalolevasse kasti.',
+ 'Please make sure you entered a correct URL.' => 'Palun kontrolli aadressi korrektsust.',
+ 'Read more' => 'Täpsem info',
+ 'Registered' => 'Registreerunud',
+ 'Remember me next time' => 'Jäta mind meelde',
+ 'Remove' => 'Eemalda',
+ 'Return to homepage' => 'Pöördu tagasi avalehele',
+ 'Russian' => 'Vene keel',
+ 'Save' => 'Salvesta muudatused',
+ 'Search' => 'Otsi',
+ 'Select form calendar' => 'Vali kalendrist',
+ 'Service Unavailable' => 'Teenus pole saadaval',
+ 'Spanish' => 'Hispaania keel',
+ 'Subject' => 'Pealkiri',
+ 'Submit' => 'Saada',
+ 'Thank you for contacting us. We will respond to you as soon as possible.' => 'Täname Teid tagasiside eest. Vastame Teile esimesel võimalusel.',
+ 'These fields will be filled automatically after you select country' => 'Need väljad täidetakse automaatselt, kui valid riigi',
+ 'Unauthorized' => 'Autoriseerimata',
+ 'Update' => 'Muuda',
+ 'Update Person' => 'Muuda isikut',
+ 'Upload' => 'Lae üles',
+ 'Username' => 'Kasutajanimi',
+ 'Username is incorrect' => 'Vale kasutajanimi',
+ 'Verification Code' => 'Turvakood',
+ 'View Person' => 'Vaata isikut - Detail view',
+ 'View code' => 'Vaata koodi',
+ 'Webpage' => 'Veebileht',
+ 'Yes' => 'Jah',
+ 'You are not allowed to perform this action.' => 'Sul pole lubatud seda tegevust sooritada.',
+ 'You do not have the proper credential to access this page.' => 'Sul ei ole piisavalt õigusi sellele leheküljele sisenemiseks.',
);
View
16 protected/views/person/admin.php
@@ -19,10 +19,10 @@
'htmlOptions'=>array('style'=>'width:740px'),
'pager'=>array(
'header'=>'',
- 'firstPageLabel'=>'<<',
- 'prevPageLabel'=>'<',
- 'nextPageLabel'=>'>',
- 'lastPageLabel'=>'>>',
+ 'firstPageLabel'=>'&lt;&lt;',
+ 'prevPageLabel'=>'&lt;',
+ 'nextPageLabel'=>'&gt;',
+ 'lastPageLabel'=>'&gt;&gt;',
),
'columns'=>array(
/*
@@ -77,10 +77,10 @@
'filter'=>$model,
'pager'=>array(
'header'=>'',
- 'firstPageLabel'=>'<<',
- 'prevPageLabel'=>'<',
- 'nextPageLabel'=>'>',
- 'lastPageLabel'=>'>>',
+ 'firstPageLabel'=>'&lt;&lt;',
+ 'prevPageLabel'=>'&lt;',
+ 'nextPageLabel'=>'&gt;',
+ 'lastPageLabel'=>'&gt;&gt;',
),
'columns'=>array(
array(
View
83 protected/views/site/extensions/dynamicrows.php
@@ -4,6 +4,7 @@
$this->leftPortlets['ptl.ExtensionMenu']=array();
$cs=Yii::app()->clientScript;
+$cs->registerScriptFile(XHtml::jsUrl('jquery.calculation.min.js'), CClientScript::POS_HEAD);
$cs->registerScriptFile(XHtml::jsUrl('jquery.format.js'), CClientScript::POS_HEAD);
$cs->registerScriptFile(XHtml::jsUrl('template.js'), CClientScript::POS_HEAD);
@@ -33,7 +34,7 @@
<div class="panel">
<table class="templateFrame grid" cellspacing="0">
<thead class="templateHead">
- <tr>
+ <tr >
<td>
<?php echo $form->labelEx(Person::model(),'firstname');?>
</td>
@@ -45,24 +46,6 @@
</td>
</tr>
</thead>
- <tbody class="templateTarget">
- <?php foreach($persons as $i=>$person): ?>
- <tr class="templateContent">
- <td>
- <?php echo $form->textField($person,"[$i]firstname",array('style'=>'width:100px')); ?>
- </td>
- <td>
- <?php echo $form->textField($person,"[$i]lastname",array('style'=>'width:100px')); ?>
- </td>
- <td>
- <?php echo $form->dropDownList($person,"[$i]eyecolor_code",Lookup::items('eyecolor'),array('style'=>'width:100px','prompt'=>'')); ?>
- </td>
- <td>
- <div class="remove"><?php echo Yii::t('ui','Remove');?>
- </td>
- </tr>
- <?php endforeach; ?>
- </tbody>
<tfoot>
<tr>
<td colspan="4">
@@ -79,21 +62,44 @@
<?php echo CHtml::dropDownList('Person[{0}][eyecolor_code]','',Lookup::items('eyecolor'),array('style'=>'width:100px','prompt'=>'')); ?>
</td>
<td>
+ <input type="hidden" class="rowIndex" value="{0}" />
<div class="remove"><?php echo Yii::t('ui','Remove');?></div>
</td>
</tr>
</textarea>
</td>
</tr>
</tfoot>
+ <tbody class="templateTarget">
+ <?php foreach($persons as $i=>$person): ?>
+ <tr class="templateContent">
+ <td>
+ <?php echo $form->textField($person,"[$i]firstname",array('style'=>'width:100px')); ?>
+ </td>
+ <td>
+ <?php echo $form->textField($person,"[$i]lastname",array('style'=>'width:100px')); ?>
+ </td>
+ <td>
+ <?php echo $form->dropDownList($person,"[$i]eyecolor_code",Lookup::items('eyecolor'),array('style'=>'width:100px','prompt'=>'')); ?>
+ </td>
+ <td>
+ <div class="remove"><?php echo Yii::t('ui','Remove');?>
+ </td>
+ </tr>
+ <?php endforeach; ?>
+ </tbody>
</table>
</div><!--panel-->
</div><!--complex-->
-
+ <div class="action">
+ <?php echo CHtml::submitButton(Yii::t('ui','Submit')); ?>
+ </div>
<?php $this->endWidget(); ?>
</div><!-- form -->
+<pre><?php if(isset($_POST) && $_POST!==array()) print_r($_POST);?></pre>
+
<div class="tpanel">
<div class="toggle"><?php echo Yii::t('ui','View code'); ?></div>
<?php $this->beginWidget('CTextHighlighter',array('language'=>'PHP')); ?>
@@ -116,24 +122,6 @@
</td>
</tr>
</thead>
- <tbody class="templateTarget">
- <?php echo '<?php'; ?> foreach($persons as $i=>$person): ?>
- <tr class="templateContent">
- <td>
- <?php echo '<?php'; ?> echo $form->textField($person,"[$i]firstname",array('style'=>'width:100px')); ?>
- </td>
- <td>
- <?php echo '<?php'; ?> echo $form->textField($person,"[$i]lastname",array('style'=>'width:100px')); ?>
- </td>
- <td>
- <?php echo '<?php'; ?> echo $form->dropDownList($person,"[$i]eyecolor_code",Lookup::items('eyecolor'),array('style'=>'width:100px','prompt'=>'')); ?>
- </td>
- <td>
- <div class="remove"><?php echo '<?php'; ?> echo Yii::t('ui','Remove');?>
- </td>
- </tr>
- <?php echo '<?php'; ?> endforeach; ?>
- </tbody>
<tfoot>
<tr>
<td colspan="4">
@@ -151,12 +139,31 @@
</td>
<td>
<div class="remove"><?php echo '<?php'; ?> echo Yii::t('ui','Remove');?></div>
+ <input type="hidden" class="rowIndex" value="{0}" />
</td>
</tr>
</textarea>
</td>
</tr>
</tfoot>
+ <tbody class="templateTarget">
+ <?php echo '<?php'; ?> foreach($persons as $i=>$person): ?>
+ <tr class="templateContent">
+ <td>
+ <?php echo '<?php'; ?> echo $form->textField($person,"[$i]firstname",array('style'=>'width:100px')); ?>
+ </td>
+ <td>
+ <?php echo '<?php'; ?> echo $form->textField($person,"[$i]lastname",array('style'=>'width:100px')); ?>
+ </td>
+ <td>
+ <?php echo '<?php'; ?> echo $form->dropDownList($person,"[$i]eyecolor_code",Lookup::items('eyecolor'),array('style'=>'width:100px','prompt'=>'')); ?>
+ </td>
+ <td>
+ <div class="remove"><?php echo '<?php'; ?> echo Yii::t('ui','Remove');?>
+ </td>
+ </tr>
+ <?php echo '<?php'; ?> endforeach; ?>
+ </tbody>
</table>
</div><!--panel-->
</div><!--complex-->

0 comments on commit 343778d

Please sign in to comment.
Something went wrong with that request. Please try again.