Jump to content

bernhard

Members
  • Posts

    6,629
  • Joined

  • Last visited

  • Days Won

    358

Everything posted by bernhard

  1. Thanks! Looks very interesting. Though I have to say that I have no time to implement that in the near future.
  2. Already done The fields are there for really simple tables and the files for more complex ones. The module will include all files related to a field automatically (PHP, js and CSS).
  3. very soon, it can be done. and even more!
  4. did a total rewrite of the module and will release it the next weeks when i'm done
  5. datatables is free & open source: https://datatables.net/faqs/index#Licensing if you plan to use it you might be happy to hear that i'm working on a new fieldtype that works similar (but even better) than my handsontable fieldtype edit: sorry, seems you are only talking about the editor. i used datatables a lot with custom action icons opening pw-panels and regular pw-edit screens. works like a charm!
  6. hi kixe, thanks for sharing this would you mind adding some screenshots or a sample usecase to know when your module would be useful? maybe you could also point out the differences to somas colorpicker module? thanks!
  7. thank you @dragan for reporting that. took me some time to get it working and in the end it was only one function call to addslashes ^^ please check the latest version of the inputfield: https://gitlab.com/baumrock/FieldtypeHandsontable/commit/57d5e117fa87470cfea784bb1f9a24e3895b8ac2
  8. hi robin, thanks for your words i've not yet found the time to make the field queryable via pw selectors. i'm not sure how that should (could) be implemented in the best way. as i've never built a queryable inputfield i would be happy to hear some thoughts about it from someone more experienced. ... or a PR where i can learn from
  9. your example works like a charm here, i just added a comma after the i18n object
  10. you could do that quite easily using jquery datatables: https://datatables.net/extensions/scroller/examples/initialisation/large_js_source.html in the example they have 50.000 records without a problem. i'm working on a new datatables fieldtype right now. do you need it for the front or backend? maybe you can get some inspiration here, but be advised that i'm working on a new version (fieldtype similar to my handsontable fieldtype) and this module will change completely edit: of course server-side would be better and client-side depends on the clients machine. so if you have special requirements that could or could not be a good way to go...
  11. for me 2 main reasons: i'm not so happy with the sftp plugin, the remote ftp plugin of atom is a lot nicer imho the github integration is great @fbg13 thanks, i'll check it out
  12. you can use tracy and the console panel for that, not to get too independent from your favourite module builder
  13. @Ivan Gretsky maybe you could just populate your pages via a little api script? I've never used adrian's module but maybe you can get the formatted values, create a new page and save it. then maybe a simple for does the trick...?
  14. hi guys, just gave the forum a quick search about ATOM.io and landed on this thread. i tested atom the last days (coming from sublime) and i'm quite happy so far. it feels a little slower sometimes but there are great plugins (like used from sublime) and the new github integration is awesome!! you should definitely check that out (little screencast-like demo website, just click on "resolve conflicts" for example): https://github.atom.io/ this one gives also a quick overview (like many other):
  15. i just saw adrian used php faker - i guess that's more powerful than my solution. but sometimes for quick testing the most simple solutions are the best
  16. @Joynal and @Ivan Gretsky maybe my module is something for you: don't know why it didn't get any response (1 like...) - as it seems to be interest/need for those situations
  17. thank you robin, this seems too complicated for my usecase. i'm working on a datatables fieldtype and i came up with this solution: private function getAjaxData() { $config = $this->wire->config; $input = $this->wire->input; // if the field is set AND the request was done via ajax we return the data of the table // if it was only the field variable it could have been requested as single field in a modal if($config->ajax AND $input->get->field === $this->name) { echo $this->getJSON(); die(); } } the data is requested via AJAX and the field is set. the further makes the field always load even if it is set to hidden+ajax - so i always get the json. don't think there's anything bad with this solution, but of course i'm happy to hear if im missing anything...
  18. what about returning some json data from inside modules? the halt() method only applies to templatefiles. is there a way to halt any other output inside the admin (inside a module) other than this? echo json_encode($mydata); die(); or is it fine to do so?
  19. would you mind adding my suggested features to your module? sorry for not making a PR, but you can just replace your render method with this one: /** * Render the entire markup returned from FieldtypeRuntimeMarkup * */ public function ___render() { //so that $page and $pages are locally scoped to the eval $process = $this->wire('process'); if($process && $process->className() == 'ProcessPageEdit') $page = $process->getPage(); $pages = $this->wire('pages'); // render files that are related to this field $root = rtrim($this->wire->config->paths->root,'/'); $file = '/site/modules/FieldtypeRuntimeMarkup/fields/' . $this->name; if(is_file($root.$file.'.php')) { // we found a file in the modules /fields folder, so render it $str = wireRenderFile($root.$file); } else { // no early reaturn because we load assets later if(!$this->runtimeFields) $str = ''; else $str = eval($this->runtimeFields); } // load assets related to this field if(is_file($root.$file.'.js')) $this->wire->config->scripts->add($file.'.js'); if(is_file($root.$file.'.css')) $this->wire->config->styles->add($file.'.css'); //since we are dealing with custom PHP code but also want to make sure that only markup is returned //if eval() returns anything other than a string or an integer, we throw an error (e.g. if an object or array is returned) if (is_string($str) || is_int($str)) return $str; else return $this->error($this->_('Only strings and integers should be returned by your custom code! Check if your code is valid.')); } this will render all files inside the folder /site/modules/FieldtypeRuntimeMarkup/ - your_field_name.php | .css | .js
  20. thank you jacmaes, would be interesting to know why uikit does not mention that more prominent... maybe they just don't care too much about html validation?
  21. hi, just checked a new sites html validation and came across lots of those errors: but it's exactly what the docs say: is it a problem of the validator? i thought custom attributes are fine for html5? has anybody more information about that for me please? thank you guys!
  22. Didn't read the whole thread but just wanted to let you know that you don't need the hook here. The body has a class with the template name, so a single css selector would be enough Don't know when this feature was implemented though. EDIT: this is a feature of AOS, not core... body.ProcessPageEdit-template-YOURTEMPLATE ...
  23. Some more nice features copy&paste (eg from excel) that way the field could be used as an import-interface with live preview (much more userfriendly than CSV in my opinion) auto-add-rows (coulb be used as something like a repeater-replacement) hot.updateSettings({ colHeaders: ['Foods'], minCols: 1, maxCols: 1, rowHeaders: false, minRows: 1, minSpareRows: 1, }); auto-add-cols (like tagging) hot.updateSettings({ colHeaders: false, minCols: 1, minSpareCols: 1, rowHeaders: ['Foods'], minRows: 1, maxRows: 1, });
  24. hi @Juergen of course i can, there are a lot In general this field is useful whenever you need array- or matrix-like inputs. I use the field for my custom CRM to input the controlling values for my clients revenues. | jan | feb | mar ... ------------------------------------- goal 1 | 10.000 | 15.000 | 20.000 goal 2 | ... goal 3 It replaces lots of repeaters and not so userfriendly inputs. I didn't mention that you also have lots of possibilities of live-validating your data (you could for example make all cells with not properly formatted dates have a red background). You see the inputfields at the bottom of the screenshot? It was too complicated to build a table-like input for that values (month values). Pagetable is too bloated for that. Maybe the matrix inputfield would have been an option, but still i think the handsontable has a huge potential. So i ended up having a simple textfield input and telling my client to devide all values by commas... not the best way!! So whenever you have thought of a field telling your clients "one on each line" or "devided by comma..." this field could help you out.
  25. just for reference, i started to build a fieldtype module for handsontable:
×
×
  • Create New...