[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb:[4507] branches/1.3/UI



Revision: 4507
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=4507&view=rev
Author:   einhverfr
Date:     2012-03-17 13:00:54 +0000 (Sat, 17 Mar 2012)
Log Message:
-----------
UI done for pricelist missing functionality to be added

Modified Paths:
--------------
    branches/1.3/UI/Contact/pricelist.html
    branches/1.3/UI/lib/dynatable.html

Modified: branches/1.3/UI/Contact/pricelist.html
===================================================================
--- branches/1.3/UI/Contact/pricelist.html	2012-03-17 10:46:58 UTC (rev 4506)
+++ branches/1.3/UI/Contact/pricelist.html	2012-03-17 13:00:54 UTC (rev 4507)
@@ -39,13 +39,13 @@
          columns.push(
                   {col_id = 'sellprice'
                      name = text('Sell Price') #'
-                     type = 'text_input'},
+                     type = 'input_text'},
                   {col_id = 'validfrom',
                      name = text('Valid From') #'
-                     type = 'text_input'},
+                     type = 'input_text'},
                   {col_id = 'validto',
                      name = text('Valid To') #'
-                     type = 'text_input'},
+                     type = 'input_text'},
          );
                         
      END;
@@ -61,9 +61,22 @@
      FOREACH pm IN pricematrix;
          pm.delete = '[' _ text('Delete') _ ']';
          pm.row_id = pm.entry_id;
-     END;
-     PROCESS dynatable
-         tbody = { rows = pricematrix }; ?>
+     END ?>
+<form name="pricematrix" action="<?lsmb script ?>" method="post">
+ <input type="hidden" name="entity_class"  value="<?lsmb account_class ?>" />
+ <input type="hidden" name="credit_id" value="<?lsmb credit_id ?>" /><?lsmb
+      PROCESS dynatable
+    attributes = { id = 'pricematrix' }
+         tbody = { rows = pricematrix }
+         tfoot = { coltypes = { int_partnumber = 'input_text' }
+                   rows = [{}]} ?>
+<?lsmb PROCESS button element_data = {
+    type = "submit"
+   class = "submit"
+    name = "action"
+    text = text('Save')
+   value = "save_pricelist"
+} ?>
 <?lsmb IF pricematrix_pricegroup;
      PROCESS dynatable
          tbody = { rows = pricematrix_pricegroup };

Modified: branches/1.3/UI/lib/dynatable.html
===================================================================
--- branches/1.3/UI/lib/dynatable.html	2012-03-17 10:46:58 UTC (rev 4506)
+++ branches/1.3/UI/lib/dynatable.html	2012-03-17 13:00:54 UTC (rev 4507)
@@ -12,8 +12,12 @@
 </thead>
 <?lsmb- END -?>
 <tbody>
-   <?lsmb- FOREACH ROW IN tbody.rows -?>
+   <?lsmb- ROWCOUNT = 0;
+   FOREACH ROW IN tbody.rows;
+   ROWCOUNT = ROWCOUNT + 1 -?>
    <tr class="<?lsmb ROW.html_class ?>">
+      <input type="hidden" name="row_<?lsmb loop.count ?>" 
+             value="<?lsmb row_id ?>" />
       <?lsmb- FOREACH COL IN columns -?>
       <td class="<?lsmb COL.col_id _ ' ' _ COL.class _ ' ' _ COL.type ?>">
           <?lsmb- IF COL.type == 'input_text' -?>
@@ -62,7 +66,8 @@
 </tbody>
 <?lsmb- IF tfoot -?>
 <tfoot>
-   <?lsmb- FOREACH ROW IN tfoot.rows -?>
+   <?lsmb- FOREACH ROW IN tfoot.rows;
+    ROWCOUNT = ROWCOUNT + 1; -?>
    <tr>
      <?lsmb- FOREACH COL IN columns;
      IF tfoot.coltypes.${COL.col_id} == 'spacer';
@@ -72,8 +77,9 @@
           <td colspan="<?lsmb SPACECOUNT ?>">&nbsp;</td>
        <?lsmb END ?>
      <td class="<?lsmb COL.col_id ?>">
-       <?lsmb IF tfoot.coltypes.${COL.col_id};
-             TYPE = tfoot.coltypes.${COL.col_id};
+       <?lsmb COL_ID = COL.col_id;
+          IF tfoot.coltypes.$COL_ID;
+             TYPE = tfoot.coltypes.$COL_ID;
           ELSE; 
              TYPE = COL.type;
           END;
@@ -112,12 +118,6 @@
                       HREF = COL.href_base _ ROW.row_id;
                    END
           ?><a href="<?lsmb HREF ?>"><?lsmb ROW.${COL.col_id} ?></a>
-                   IF row.${COL.col_id}_href_suffix;
-                      HREF = COL.href_base _ ROW.${COL.col_id}_href_suffix;
-                   ELSE;
-                      HREF = COL.href_base _ ROW.row_id;
-                   END
-          ?><a href="<?lsmb HREF ?>"><?lsmb ROW.${COL.col_id} ?></a>
          <?lsmb- ELSE -?>
             <?lsmb ROW.${COL.col_id} ?>
          <?lsmb- END -?>
@@ -128,5 +128,7 @@
    <?lsmb- END -?>
 </tfoot>
 <?lsmb- END -?>
+<input type="hidden" name="rowcount_<?lsmb attributes.id ?>" 
+      value="<?lsmb ROWCOUNT ?>" />
 </table>
 <?lsmb END #block ?>

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.