-
Posts
6,629 -
Joined
-
Last visited
-
Days Won
358
Everything posted by bernhard
-
I'm talking about the built in panel. Just add the class "pw-panel pw-panel-right" to a link and it opens in a sidebar panel like this: It's similar to the modal, but newer and i prefer it over modals. It's great to open PDFs for a preview for example. Or to open items in my datatables. See \wire\modules\Jquery\JqueryUI\panel.js for details. Would be awesome to make those panels draggable
-
hi tpr, the draggable devider looks great. would it be possible to add this feature also to the core pw-panel?
-
Module Module: RuntimeMarkup Fieldtype & Inputfield
bernhard replied to kongondo's topic in Modules/Plugins
i guess the browser strips your form because it is inside the processwire form that contains all the inputfields and a form inside another form is not valid html. the inspector shows you the code after browser and javascript manipulations. if you view the raw sourcecode you maybe see your form element. http://stackoverflow.com/questions/555928/is-it-valid-to-have-a-html-form-inside-another-html-form -
i am quite busy those days so i missed that yeah i was not sure about that as well. i thought of placing it beside the open/close toggle of the field label.
-
hi @tpr, it would be nice to have a "fullscreen" button for some of my inputfields in my current project. it seems to be quite easy to make the inputfields content div fullscreen like this: .fullscreen { height: 100%; width: 100%; left: 0; top: 0; overflow: scroll; position: fixed; z-index: 999; } i need it for my datatables fields, but i'm thinking if that would maybe also interesting for other fields. that's why i thought creating a module. and then i thought that could maybe be interesting for AOS as well. like having a toggle icon to make CKE fields fullscreen? with fullscreen i mean full browser window what do you think?
-
hm... i looked to your github docs and it seemed that it has more features than only populating fields from github. even though it would be nice to get the bigger picture. are you listing several github projects on your site? like listing several tutorials that are hosted on github?
-
very nice, thanks for bringing my attention to jasonette! i created this shorturl to save me from typing: https://goo.gl/XUB7jb unfortunately the all links do not work for me. neither with the original url. only link working is the external link to your website... any ideas? (android)
-
as i said: maybe you took care of it on mobile just wanted to let you know: http://ohmspeaker.com/speaker-filter/?width=14&height=15&price=3200&distance=21
-
same request as with your guid module. could you please provide a simple usecase what you use it for? sometimes that brings up new ideas in my head
-
could you please tell us what you use it for? i know what it does but sometimes it's easier to get the context by an example. thank you
-
hmm... maybe you could hook page::viewable? something like hookafter page::viewable if($page->isUnpublished() AND $page->previewcheckbox == 1 AND $page->createdUser == $user) $event->return = true; i would also create a hook to remove the preview checkbox for all pages that were edited more than 1 hour ago (or 1 day)
-
hi macrura, just visited your site again because i may need something similar. as i did lots of work with datatables recently i saw you might want to add scrollx to your table as it is not 100% visible on very small screens: https://datatables.net/examples/basic_init/scroll_x.html maybe you are already checking for mobile devices. i just checked with chrome window resize
-
Preview/Discussion: RockDataTables
bernhard replied to bernhard's topic in Module/Plugin Development
current version has properly formatted currency fields (atm only euro) and supports colorbars and column sums (also from selected rows) had to remove this video, sorry -
hi @Macrura, glad you like it, but to be honest i don't think any more that this module has a big value now as i've done a lot more modules on my own, i would just put a simple hook into ready.php and hardcode the description. or get the description from a field in a custom settings page or the like...
-
most likely it will be a path issue... try something like that: http://stackoverflow.com/questions/22092683/mpdf-5-7-1-image-displays-as-a-broken-x
-
It is still the same. Show us the code you have and tell us the steps you did and I'm sure someone will help you
-
add a sql query to a pages->find() operation?
bernhard replied to bernhard's topic in General Support
Thank you szabez!! Your post looks ideal for me and helped a lot selector arrays would be much better in other places of my projects code as well -
add a sql query to a pages->find() operation?
bernhard replied to bernhard's topic in General Support
Thank you. Was just wondering if there's a maximum length for a selector string or something like that -
add a sql query to a pages->find() operation?
bernhard replied to bernhard's topic in General Support
Yes, that was one part of the question: how scalable is it...? -
add a sql query to a pages->find() operation?
bernhard replied to bernhard's topic in General Support
Hm. I already had this field in place but I removed it because I didn't want to mess with hooking and having bugs like forgetting to update the field on page delete or the like. Thank you for your input, I'll take a second thought on this -
add a sql query to a pages->find() operation?
bernhard replied to bernhard's topic in General Support
Yes that would be what I need and what I stated in my first post. But still I think it would be the best to get those pages by sql. As I said I'm using a custom dB view. The question is how to exclude the IDS properly. Create an ID string by foreach-ing all SQL results? -
add a sql query to a pages->find() operation?
bernhard replied to bernhard's topic in General Support
Hmmm... Thank you but that's not what I'm looking for. It's not that easy. I'll try to explain more in detail. I have clients on the one hand and projects on the other. Then I also have acquisition processes (acp) that connect clients and projects (like acp "get client x for project y" would connect client x and project y). It's easy to select all acp that started in a given timeframe (first example). But now I need to select only acps that are related to a special type of client. The problem is that this type is dynamically depending on the given year. I have three types of clients: Clients that already had some revenue in the years before , clients that had their first revenue in the current year and clients that did not have any revenue at all. So I cannot count the started processes and subtract the number of clients... I think I have to go the SQL way, but I wanted to make sure that there is no other magical PW way like subselectors. I guess in my case, as I'm querying a custom dB view it's best to go with SQL -
Preview/Discussion: RockDataTables
bernhard replied to bernhard's topic in Module/Plugin Development
hi kathep, sure it is also usable in the frontend. but it is no click-click solution. the module just provides some helpers to define the columns like i showed in the example. to make the code more clear to read, write and maintain. you would just have to include the right scripts (i'm currently loading all the plugins via cdn) and you would be fine. maybe you would also have to do some styling. but all of that is - at least for now - not intended to be handled by my module. hope that answer helps you -
hi, i have a quite complex find operation to do. i already setup those find operations via $pages->count('my selector') the problems is, that i have to exclude some pages from this result. its not possible to put this into a sub-selector because its a complex query that has to do some group by and date comparison and so on. i want to stay with the pages->count() on the other hand because changing completely to an sql query would need some refactoring... what i have now: <?php $count = $pages->count( 'template=rockacp'. ',rockacp_start>'.$fromto[0]. ',rockacp_start<'.$fromto[1] ); what i need is something like this: <?php $count = $pages->count( 'template=rockacp'. ',rockacp_start>'.$fromto[0]. ',rockacp_start<'.$fromto[1]. ',client.id!=1|2|3|4' ); In the example it would be fine, i'm just wondering what would happen if the number of pages gets too large? I don't like the idea of creating an pipe-separated id string and using this for my count operation... any better ideas for this? thank you
-
Preview/Discussion: RockDataTables
bernhard replied to bernhard's topic in Module/Plugin Development
need to setup tables via custom sql queries? PHP // init datatables module $dt2 = $modules->get('RockDataTables2'); // setup columns $sql = 'SELECT * FROM invoicetable'; $dt2->setupColsBySql($sql); // setup table $dt2->id = 'dt_finanzbuch'; $dt2->js('/site/modules/ProcessRockFinance/dt_finanzbuch.js'); $f = $modules->get('InputfieldMarkup'); $f->label = 'Tabelle'; $f->value = $dt2->render(); $form->add($f); // ################################## // ajax request -> return data // non-ajax -> render form + table // ################################## if($config->ajax) { echo $dt2->getJSON($dt2->getDataBySql($sql)); die(); } JS $(document).ready(function() { // setup variables var opt = ProcessWire.config.dt_finanzbuch; // options from backend var colDefs = []; // column definitions // custom column definitions here // load default column definitions colDefs = colDefs.concat(dtGetDefaultDefs(opt)); // initialise table $('#dt_finanzbuch').DataTable({ ajax: { url: './book/', type: 'post' }, columnDefs: colDefs, pageLength: 10, footerCallback: columnSums, }); }); Result As you can see the sum function is not ready. it shows euros for my usecase...