Jump to content

tpr

Members
  • Posts

    2,321
  • Joined

  • Last visited

  • Days Won

    44

Everything posted by tpr

  1. Spent about an hour to find a flexbox grid that utilizes sass and doesn't require adding classes to markup. Finally I found this: https://ajy.co/the-simplest-sass-flexbox-grid-ever Keeper!
  2. For JSON storage I'm using a render and renderValue hook that turns a textarea to formatted table layout in my form submissions: It works quite well, the only disadvantage is that you can't search entries like 'email=...' because there are only 1 field (json_storage). But I guess you don't need this feature anyway. I can share the code if you wish, though it's part of a module so it's not that easy to decouple.
  3. Just switched from Neat to Susy in the current project because I was fed up with not able to accomplish a few simple things in Neat (of course, it may be that I was doing things the wrong way). The good thing was that it took about 10 minutes to swap the grid as there was no grid classes in the markup. This reassured me that grid classes in the markup is not necessarily a good decision. So far I'm fine with Susy, seems more logical to me.
  4. Available from the Modules Directory: http://modules.processwire.com/modules/front-end-edit-lightbox/
  5. How many items do you have at max? I prefer being able to see all items and for editors it is easier to understand. So if it breaks multiple lines it's OK to me.
  6. tpr

    Hanna Code

    That's great and I was sure about that reading your post. But those two sentences just made me laugh, they read like something really awkward has happened (maybe I've watched too many Monthy Pythons back then )
  7. tpr

    Hanna Code

    That doesn't sound like a success story ;-)
  8. tpr

    Hanna Code

    @Ferdi Couldn't you load a loader js file that loads the library, and only if it hasn't been loaded? Surely you can check for a Js object name for example.
  9. It would be also nice having callback functions for admin Js operations. Possibly with the ability to block operations, eg "if myCallback() == false return false".
  10. How to add custom format tags to CKEditor? Maybe this was posted before but here it is if somebody is in a desperate need of this. Here I add 'section' and 'small' tags to the Format dropdown. Entering additional tags in the field's settings in the admin ("Format Tags") doesn't work, results in a JS error: Uncaught TypeError: Cannot read property 'type' of undefined Drama. Searching for a solution everybody suggest two things: adding extra config options to config.js ("config.format_section = {element: 'section'}") plus editing language file (eg. "en.js") and add strings to these new tags that will appear in the dropdown I started this route but soon turned out that PW is not picking up languages from "/site/modules/InputfieldCKEditor/lang/" directory. Editing ones in "wire" dir works, but that's more of a drama as they will be wiped out on next update. Adding extra config options to config.js worked, but the new tags didn't have names (they were only empty lines in the dropdown, however, they worked). Finally I found that adding a "name" along with the element works (in "/site/modules/InputfieldCKEditor/config.js"): CKEDITOR.editorConfig = function (config) { config.format_section = {element: 'section', name: 'Section'}; config.format_small = {element: 'small', name: 'Small'}; }; Now these extra tags will appear in the Format dropdown and they'll also have names (titles). Also you'll need to add the extra tags in the "Format Tags" field in the admin (found on the ckeditor field's "Input" tab): p;h2;h3;h4;h5;h6;address;section;small The best would be if we could set these either only in the admin or in config.js, so not in two separate locations. I couldn't find a way to achieve this but it's still relatively easy to add.
  11. A new version is uploaded to GitHub. This release fixes JS dependencies as all required JS files are loaded via the main JS file, only if they aren't present. Furthermore, CSS files are also loaded by the main JS. Main changes: new option: disable autoloading FrontEndEditLightbox.js. This enables loading it manually, for example when using a script loader. new option: custom data-* attributes feature. Can be useful for further JS/CSS processing (eg. ajax reload parts using FEEL callbacks) load jQuery and Magnific Popup by FrontEndEditLightbox.js (only if they aren't loaded) added simple ajax reload implementation exampe to the readme file
  12. Currently I'm building a multilanguage website but what's more important, I managed to convert my "drop-in" helpers into modules. These include TemplateLatteReplace and NetteFormsHelper modules, which will be shared after they look stable enough. The Latte template engine module is almost invisible: handles default template render and wireRenderFile just fine. I may have gone with the TemplateEngine module but I like that it's lightweight and that I understand what's going on inside NetteFormsHelper makes creating forms a breeze (though it's 100% developer-centric), and I'm working on adding useful features to it. Currently it supports: ajax or non-ajax submission live form validation (js) automatically add js/css assets saving data as page using "json_storage" field (which is a simple textarea holding a json encoded array, but visually looks like a formatted table in the admin) send emails with Latte tempates several form layouts (form renderers) autocomplete: supports suggestions from arrays and urls (ajax) character counter: needs only passing an array of settings, can count up/downwards, its text is customizable/translatable Form and field definitions are separated so forms can be easily copied to another project. Just to clarify: these are non-PW fields. I also have an AutoSmush module (imagemin through resmush.it) which actually works but needs a major revisit before going public, if ever. Anyway, bulk running on site images eliminates google pagespeed warning, which is great. Another helper I'm usng is Tracy debugger, which was made into a module by adrian so one todo item could be removed These modules makes development much more fun. I should have started them as modules right from the beginning.
  13. Interesting feature though not sure if I would ever use it. Btw, having no access to the remote files, how would you know the line numbers? (and without being a PHP guru )
  14. Here's how I set up the editor protocol handler on Windows 8. I started out using this but needed to modify a few things. Note that I'm using a portable version of PhpStorm (using my own yaP launcher), so installed versions may need some modifications. Module settings, "Editor protocol handler" field: pstorm://open/?url=file://%file&line=%line There's "editor.reg" file with these contents: REGEDIT4 [HKEY_CLASSES_ROOT\pstorm] @="URL:pstorm Protocol" "URL Protocol"="" [HKEY_CLASSES_ROOT\pstorm\shell\open\command] @="wscript \"D:\\portables\\PhpStorm\\run-editor.js\" \"%1\"" and also its counter-part, which removes registry key, "editor-unreg.reg": REGEDIT4 [-HKEY_CLASSES_ROOT\pstorm] The "editor.reg" needs to be merged to the registry - double click on it, or using regedit.exe and "Import" from the menu. Note that you need to do this in admin mode, otherwise registry settings won't be added. "editor-unreg" is only needed to clean the registry, possibly you won't ever need this. Then you'll need a file named "run-editor.js" in the directory you've set in "editor.reg" There's some hardcoded paths, project name and window title in the code below - these still need revisit. "run-editor.js" file contents: var settings = { // Set to 'true' (without quotes) if run on Windows 64bit. Set to 'false' (without quotes) otherwise. x64: true, // Set to folder name, where PhpStorm was installed to (e.g. 'PhpStorm') folder_name: 'PhpStorm 9.0', // Set to window title (only text after dash sign), that you see, when switching to running PhpStorm instance window_title: 'PhpStorm PS-145.61.14', // In case your file is mapped via a network share and paths do not match. // eg. /var/www will can replaced with Y:/ projects_basepath: '/YOUR_PATH_HERE', projects_path_alias: 'D:/Projects/YOUR_PROJECT_NAME' }; // don't change anything below this line, unless you know what you're doing var url = WScript.Arguments(0), match = /^pstorm:\/\/open\/\?url=file:\/\/(.+)&line=(\d+)$/.exec(url), project = '', editor = "D:\\portables\\PhpStorm\\PhpStormPortable.exe"; if (match) { var shell = new ActiveXObject('WScript.Shell'), file_system = new ActiveXObject('Scripting.FileSystemObject'), file = decodeURIComponent(match[1]).replace(/\+/g, ' '), search_path = file.replace(/\//g, '\\'); if (settings.projects_basepath != '' && settings.projects_path_alias != '') { file = file.replace(new RegExp('^' + settings.projects_basepath), settings.projects_path_alias); } // note: uncomment to see the popup message (for testing) //shell.Popup(file, 0, "My Title", 64); while (search_path.lastIndexOf('\\') != -1) { search_path = search_path.substring(0, search_path.lastIndexOf('\\')); if(file_system.FileExists(search_path+'\\.idea\\.name')) { project = search_path; break; } } if (project != '') { editor += ' "%project%"'; } editor += ' --line %line% "%file%"'; var command = editor.replace(/%line%/g, match[2]) .replace(/%file%/g, file) .replace(/%project%/g, project) .replace(/\//g, '\\'); shell.Exec(command); shell.AppActivate(settings.window_title); } That's all. Clicking on a Tracy error line load PhpStorm at the file/line specified, and also brings the application to the front (activates it). If you encounter errors, try to "debug" using popup messages (see "shell.Popup(..." line in the js file).
  15. Finally got the protocol handler thing to work on Win(8), thanks!
  16. I can't test it right now but I also clicked on the link in the error panel.
  17. I got the same issue as szabesz on Win, though I haven't checked it with the newest version.
  18. You know that a new sanctuary is just being built for you somewhere in Austria
  19. Using bourbon-neat in two current projects, and kinda like it. But I don't really get why it isn't mobile-first by default - I know it's easy to adjust to be mobile first, but the official docs is using desktop-first approach. Does someone know the reason?
  20. Thanks for the new releases! I get used to it recently, updating Tracy when having the morning coffee Adding an "in-panel search as you type" feature would be handy I think. Basically I mean a search input above the panel tables (one per panel), in which if you start typing the table non-matching rows would get hidden. The problem is that not all panels have tables but divs.
  21. Since you can add Twig or other template engine through modules I don't think it's a minus. Actually rather a plus since it's optional and the core is smaller. Besides my very first project I use a template engine in PW.
  22. Maybe creating a 1/4 and 3/4 columns in the admin, where the first would hold the asm select of the submodules, and the other their settings would make the page structure more logical. I'm not sure the asm select can do showIf things, that would be the best. I guess this would satisfy those who needing a cleaner UI. Personally I'm fine with the current one though, it's an admin page after all.
  23. You could try upgrading to see if it helps, provided if you don't have to stick with that version for some reason (backup first). But imo string translation should work with 2.5, it was added in 2.2 as I know.
  24. Maybe this: https://processwire.com/talk/topic/11499-admin-restrict-branch/
×
×
  • Create New...