We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 33976 ☆ A M B ☆
    • 571 Posts
    I either ehe
    So far i found how to load system "lexicon" strings, now i need to find how to load custom ones in smarty, since the tpl is smarty + ExtJS,
    {literal}… header: '{/literal}{$_config.site_name}{literal}'…
    works
      • 17422
      • 225 Posts
      I install sortableCheckbox,

      before recording, so I check the box and I m a drag after, it remembers the value it had in the last record

      see printscreen,

      first printscreen => before drag
      second printscreen => deselected the box
      third printscreen => after drag

      On modx revo 2.0.5

        • 17883
        • 1,039 Posts
        Not sure, also happens sometimes to me. Seems to be more an ext issue because dragging implies also clicking on that row which (sometimes) selects/deselects the checkbox. Will take a look.
          • 11076
          • 159 Posts
          thanks marc, you made my day wink
          i’ll give it a try later..
            Michael Shraibman( gOmp)  | Freelance Design & Development | wink  impossible is nothing...
            • 17422
            • 225 Posts
            Quote from: MadeMyDay at Dec 15, 2010, 07:41 AM

            Not sure, also happens sometimes to me. Seems to be more an ext issue because dragging implies also clicking on that row which (sometimes) selects/deselects the checkbox. Will take a look.

            in checkboxSortable.tpl

            here :

            for (i = 0; i < rows.length; i ++) {
            store.remove(store.getById(rows[i].id));
            store.insert(cindex,rows[i]);
            }
            


            the code remove the id with the new value of checkbox
            and insert with old value of checkbox.

            i think of before remove the row, update the row with new value of checkbox.

            but i don’t know how to do for update the store array.
              • 4172
              • 5,888 Posts
              try:

                  var ddrow{/literal}{$tv->id}{literal} = new Ext.dd.DropTarget(
                      grid{/literal}{$tv->id}{literal}.getView().mainBody, {
                      ddGroup: 'zusatzInhalteGroup',
                      notifyDrop: function(dd, e, data) {
                          var sm = grid{/literal}{$tv->id}{literal}.getSelectionModel();
                          var rows = sm.getSelections();
                          var cindex = dd.getDragData(e).rowIndex;
                          var store = grid{/literal}{$tv->id}{literal}.getStore();
              			var checkbox_id = null;
              			var cb = null;
                          if (sm.hasSelection()) {
                              for (i = 0; i < rows.length; i ++) {
                                  checkbox_id = store.getById(rows[i].id).data.id;
              					cb_checked = Ext.get(checkbox_id).dom.checked;
              					store.remove(store.getById(rows[i].id));
                                  store.insert(cindex,rows[i]);
              					Ext.get(checkbox_id).dom.checked=cb_checked;
              				
                              }
                              sm.selectRecords(rows);
                          }
                      }
                  });
                -------------------------------

                you can buy me a beer, if you like MIGX

                http://webcmsolutions.de/migx.html

                Thanks!
                • 17422
                • 225 Posts
                Thanks a lot Bruno,

                work perfecty smiley

                I’m starting to understand slowly fonctionnemnt of Extjs but it’s not easy !! smiley smiley

                Laurent
                  • 33976 ☆ A M B ☆
                  • 571 Posts
                  Bruno’s fix + lexicon support added on my fork. I can request a pull if you want MadeMyDay. Gonna try to make a script to manualy package the stuff.
                  Once again, much thanks for your awesome work guys
                    • 17422
                    • 225 Posts
                    me again smiley !

                    in default values, I do not have accents, brackets and other, how can I do to protect data?

                    ex value :

                    tot ' A (40) ==1 || tot ' ç == 40


                    i tried this :

                     `tot ' A (40) ` ==1 || ` tot ' ç `== 40


                    but not working
                      • 17883
                      • 1,039 Posts
                      Hey lolotlm,

                      what is your problem with these chars? I copied
                      tot ' A (40) ==1 || tot ' ç == 40


                      as options and it works as expected.