Jump to content

Soma

Moderators
  • Posts

    6,798
  • Joined

  • Last visited

  • Days Won

    158

Everything posted by Soma

  1. If something I learned over the years, it's to watch your css for navigations ... as simple as possible pays out. However since older browsers are left behind it good to move on. I updated the Module to 1.1.7 to fix the warning. Thx for mention.
  2. I dont really get what the problem is. You have the current parent and the section. list_field_class => 'p{id}' Then in css li.parent.p1001{..} Or li.parent.p1001 > a { ..} To style active section item with parent id 1001
  3. Thanks mats for the heads up. I think It was late when doing this. Have to take a look a again at that $class variable. I should practice what I preach As for the wish, I'm not sure what you mean because you can aleady define what you want: parent_class : class for all active parents has_children_class : class for parents that have children now new list_field_class: add classes like {name} to each item (which is what you need not?) so a active parent of the current page will have <li class="parent has_children about">... I didn't just add this new feature to "parent_class" because adding the possibility to add {fieldname} to all items covers all needs and not just for parents.
  4. Ah se you already found a solution... Here how it would be done. Simple. // html output echo "<ul id='$repeaterPageId' class='gallery'>"; ... <script> $(function(){ var options = {}; $("#<?php echo $repeaterPageId;?> a").photoSwipe(options); }); </script>
  5. Add photoswipe init once through a class you then give to all galleries and be done. <script language="javascript" type="text/javascript"> (function(window, $, PhotoSwipe){ $(document).ready(function(){ var options = {}; $(".gallery a").photoSwipe(options); }); }(window, window.jQuery, window.Code.PhotoSwipe)); </script> No need to create a javascript code with an unique id for each gallery you add in html.
  6. Its a real pain to scroll 2km code down on mobile. Just to get to the next message.. And while im down here already I thought I'd say something.
  7. Use filter on template screen above to show system templates. Select user template add fields to it you want.
  8. I noticed that when I resize the image in TinyMCE in Chrome it wouldn't resize really. The dragged image is smaller and width and height set in image tag. But when saving and looking at source the image is still the original! I noticed this because of responsive image css with max-width: 100%; It wouldn't show scaled version but still same size. In FF it worked and I tracked it down to in Chrome the click event check for the nodeName wouldn't return IMG for the first mousedown event for some reason. The check for the nodeName on the selection of TinyMCE would not return "IMG" . After trying to find a solution deperately I found a really minor fix that solves the issue in Chrome while it still works in FF. The trick is to just get the event.target instead. And I hope in other browsers it still works too but I'm sure it will. But maybe with IE could test this out? I made a pull request on the responsible TinyMCE PW plugin file. https://github.com/ryancramerdesign/ProcessWire/pull/174 Changed file https://github.com/somatonic/ProcessWire/blob/7c4d160152aae3aeb33b68a852c45c35008b0b54/wire/modules/Inputfield/InputfieldTinyMCE/plugins/advimagescale/editor_plugin.js
  9. Thanks Nico! It's still 2.0.5 on http://modules.processwire.com/modules/process-preview/
  10. Nico already showed how to get it. $repeaterPage = $page->get("name_of_repeaterfield")->first(); // gets first repeater $repeaterPageId = $repeaterPage->id; echo "<div id='$repeaterPageId' class='gallery'>"; Is same as: $repeaterPage = $page->name_of_repeaterfield->first(); // gets first repeater $repeaterPageId = $repeaterPage->id; echo "<div id='$repeaterPageId' class='gallery'>"; Or loop through repeater as if they're pages (they are) foreach($page->name_of_repeaterfield as $repeaterPage){ $repeaterPageId = $repeaterPage->id; echo "<div id='$repeaterPageId' class='gallery'>"; }
  11. Just pushed an new update today to replaced the "page-edit" permission from module config and replaced it with 'modules-manager', as editors with page edit permission were able to see this module in the admin. So please update to the latest version in case you don't want you're editors to see Modules Manager. Thanks @jkenters for the issue report.
  12. I just commited an update to 1.1.6 While editing the wiki documentation page it somehow was deleted after editing doh! So updated readme a little and copied that to the wiki. `list_field_class` option (new in 1.1.6) You can optionally define custom classes using a string that can contain tags for field names of pages. For example: 'list_field_class' => '{template} p{id}', will add ' basic-page p1001' to each 'list_tpl' class string.
  13. I might add a list field class option string, so you can add fields you want to each <li> item. so you could add whatever classes and do: 'list_field_class' => '{template} p{id}', and it would add this to every page list_tpl. And if left empty (default) it won't output. I think then with this one can cover all aspects a basic navigation needs more or less.
  14. You're welcome. I can't see where you say, I changed it all I thought. nevermind found it... thx.
  15. Hey @mats, can you tell a little more what you want to do or better why, so I can think a little better?
  16. Yes sorry, I forgot about it that it works only for 1 parent! Too many things in my head lately However, maybe you can use "parent=id|id2|id3" if it only for direct children pages. Maybe you can tell a little more about what you want to archive, I'm sure there's a good solution.
  17. Sorry, I assumed it is clear. In the field advanced settings. Go to Setup -> Fields, open title field and under Advanced you'll find the Global setting. Uncheck it and you can remove title fields from templates.
  18. Remove global flag from title so you can remove it from templates. Name field is required, as it is sort of the "id" of the page that is needed to have.
  19. Great work Ryan! Well I can't say I like ckeditor more than tinymce yet. But that's maybe personal experience using them. Sure some things are nice and it may more robust in some cases, and inline mode is such a cool feature, but overall I still struggle to see what's really better for an editor. Testing the new editor I think as it is now, the table tool is not really more usable than with tinymce. I think it's even worse or same. In Chrome it's hard to use and select (same in tinymce), in FF it works but if you turn off border you can't see the table anymore like in tinymce. This is in inline edit mode and standard. Maybe there's a setting like in tinymce to show it?
  20. Thanks for adding Nico. Wanted to mention an notice that shows up when in debug mode. Always turn on debug mode when developing. <b>Notice</b>: Undefined index: id in <b>/xxx/site/modules/ProcessPreview/ProcessPreview.module</b> on line <b>31</b><br /> And then also the Page Tree doesn't load when debug mode in on..
  21. Profile exporter doesnt work for fully with multilang title field yet as you found out. But that'salready known. However you don't need profile exporter to update from 2.2.9 to 2.3. Just replace wire folder.
  22. And I found that out without debugger... :-P
  23. Well the imageType and filename property is protected in the imageSizer class. That's why.
  24. And does it work? I don't know really what is if it doesn't work. Maybe something like this? http://stackoverflow.com/questions/5444249/unable-to-find-the-wrapper-https-did-you-forget-to-enable-it-when-you-config
×
×
  • Create New...