Jump to content

apeisa

Moderators
  • Posts

    4,632
  • Joined

  • Last visited

  • Days Won

    55

Everything posted by apeisa

  1. Soma is on fire! I just recently thought about something like this, when we discussed about "blurring the lines" with ajax usage, and visioned that something like this would make editing safer.
  2. Ryan, no worries. Always feel free to edit all my coding as you see fit.
  3. Can you mac fellows test this in safari and maybe provide even quick screencast? Some reports that: a) It doesn't work (fallbacks to old school - this is what I assumed) b) It does work - kind of. You can drop files directly to inputfield, but not to field area. In that scenario, does the upload start immediately or do you need to save page?
  4. Great stuff. I went totally crazy on Twitter because of this Great job fellows!
  5. I added my modifications (simple validation for filesize & extension) and also added fancybox & sortable for right away added images. I agree with Ryan on not to go too far with ajax-features.... EDIT: Small modification to Inputfieldfile.js file to line 200: if (extensions.indexOf(extension) == -1 && extensions.length > 1 && extension != "zip") { I was too lazy to zip & upload again. If for some reason extensions array is empty, then we skip pre-validation all together. And it seems that allowing zip extension is not required if you want to use "decompress zip files" settings (and I confirm: does not work on windows). InputfieldFile.zip
  6. I haven't had the similar need by myself - although it might be that if something like that will be implemented I would use it. More often I would like to go from templates to fields and from fields to templates. Don't like that I have to go through setup page all the time. Will probably add some kind of dropdown menu for that though.
  7. http://processwire.com/api/variables/input/ And allow url segments in your template.
  8. That sounds excellent! My update had only few lines of code, so I can easily merge those. I'll do that tomorrow, now heading to bed. I didn't realize that ini file size settings can be also G and others, so I will refine that conversion script too.
  9. A bug or configuration problem in default install. In admin code it says this: <?php $searchForm = $user->hasPermission('ProcessPageSearch') ? $modules->get('ProcessPageSearch')->renderSearchForm() : ''; But there is no such permission at all. Should be, I think.
  10. One solution could be adding these bulk selection tools to search lists. Or then just simple "delete mode" on pagelist (toggle click, and after that only "remove" button after each page and finally after choosing which pages to remove some kind of confirmation).
  11. Ok, I did some pre-validation on front-end (simple check on file extension and filesize). See the attached zip (contains only changes files, .js and .module). Please test at least few times and with "difficult" filenames and sizes. Works fine on my localhost. Only thing I am not sure is how I get max filesize: <?php $max_upload = (int)(ini_get('upload_max_filesize')); $max_post = (int)(ini_get('post_max_size')); $memory_limit = (int)(ini_get('memory_limit')); // comes megabytes from php.ini, we convert to bytes (ie. 1024 * 1024 * 2M = 2097152 bytes) $this->max_filesize = 1024 * 1024 * min($max_upload, $max_post, $memory_limit); Is there some $config or field setting already on pw or is this ok? InputfieldFile.zip
  12. We cannot really validate before upload starts (since we don't have file that we want to validate), but definitely could (and should) do some basic checks there (supported filetype and small enough filesize at least). I'll look into this (should be easily doable). Good point about that someone might get confused to see preview of image before it is uploaded. Although not sure if that is the case, since there is pretty big progressbar going on also. Maybe some label like "preview" or "currently uploading" would make it clear.
  13. Just tested and old school works, as well as html5. Great job and thanks again for finishing this! What comes to preview and maybe instant removing => after 2.1 definitely. And previewing might be best to do using js: we could show the image at the same time than it uploads (if there were something to remove, you could stop uploading before it finishes and never ends up to the site). We wouldn't need to create thumbnail image at all on the backend (although that is needed anyways if you use thumbnails setting on your field).
  14. I would like to see at some point a button which allows removing all the children. Maybe on children tab. Bulk deleting while developing a site is pretty simple through API (not tested and written in browser): <?php foreach($pages->find("template=something, parent=/testing/") as $removePage) { $removePage->delete(); } Of course selectors will change depending on what you want to remove. Just add that snippet to your template file and visit page that uses that template. EDIT: Didn't read your post very well Formmailer. In your situation there might not be a good selector (if you need to pick those 35 pages manually). So something like bulk editing would be the best way in situation like that.
  15. It is implemented. Probably you just miss the "Filter" on top of the templates page, where you can let it "Show system templates". After that just add more fields to your "user" template.
  16. AjaxUploads works perfectly! Great to see this so polished and working so well. Only thing that does not work is old school uploading - I couldn't add new files with IE.
  17. Yep, that is what is required: http://en.wikipedia.org/wiki/List_of_HTTP_header_fields#Requested-With I have always thought that it is automatic when using XMLHttpRequest, but as wikipedia tells us, it is more like common practice between different js-frameworks to use that. So your solution is just right here. This is good! We can send separate POST vars (if I understand you correctly), but I couldn't figure out how to do it at the same request with file upload (not sure if it is possible there, like it is with regular ajax posts). So in file uploads we need to use headers, so your current solutions sounds good and flexible implementation.
  18. Yep. After reading more about how contentEditable/designMode work (most of the editors use designMode - textarea goes into iframe) and how buggy the support is, then it is not surprise that there are so much issues. Add in tons of features, many different use cases (copy from word, from another website, undo button etc), normal browser rendering differencies, then it will be clear that it's not a simple case. And aloha-editor does use contentEditable instead of designMode, which seems to be even more buggier. But it seems that Aloha is the best (only inline editor?) there is currently so I will continue with that.
  19. Hmm... strange. I am running almost latest version of P21 and ProcessRedirects without any problems. Have you tried uninstalling and installing again? Can you show me screenshot of redirects page (or if you are willing provide me with login credentials for a day or two that I can go and check what is wrong?). EDIT: Also what is template in your /processwire/setup/redirects/ page? I assume it is admin and then Process is "processRedirects" since otherwise you shouldn't be able to add new redirects. But just in case.
  20. I spend few hours last night to read about contenteditable and how to implement simple js rich text editor. It sounds simple (browsers have it built in, since IE 5.5 - then reverse engineered from there to other browsers). But (and pretty big but) - the implementation is very messy. Gotta respect TinyMCE & Co more, that is actually super messy stuff that different browsers provide (I tested just chrome, ff and opera) and amazed that there has been so little progress on that area. This being said I don't think I have time (or skills) to build solid rt-editor from scratch. I started to look if there is any library that can clean the html (I found some stuff to clean word pasting) that different browsers provide and make them similar in each, but no luck there. Maybe I could loan some parts from other projects (if their licencing allows) if it possible. Not sure though. If someone finds simple editor, that provides about the same markup and can be added to any element (not just textarea), that would be great. If not, I probably continue with Aloha and try to do my best with multiple jQuery versions.
  21. Just realized that aloha.js is almost 1 meg javascript minified... it has jquery build in, but also ExtJS. That does complicates things (I had this first loading in admin also, and earlier version (I assume) of jQuery was messing things up...). It would be real problem on front end to make sure that your site jQuery or ExtJS (if you use either one) is always the same version than Aloha requires... There was aloha-nodeps.js included, but need to add ExtJS and jQuery separately then. It just feels damn bloated for such a "small" functionality (I really want to have quick edits and save). This made me thinking of building super simple editor by myself (there is nice html5 API for that too). Or might add some other light weight editor (I don't consider aloha a light weight anymore)... Not sure though and will definitely take Aloha further and test it more (make it save stuff). What do you guys think? What are the features you are expecting from "quick editing"? Just editing text & save? Strong, italics? Headers? Links? Images?
  22. If you click the big "Moby Dick" header, then you can only add links, not change formatting at all. Exactly what we want to do with headers (probably many times want to disable links too...). The 3 columns is simple stuff, using vendor specific css: -webkit-column-width: 300px; -webkit-column-gap: 30px; -moz-column-width: 300px; -moz-column-gap: 30px; width: 960px;
  23. Ryan, thanks for the commit, will implement this further soon. Title fields - I was too pessimistic, even one of their examples have different options for title: http://aloha-editor.org/demos/3col/
  24. Which version of pw? What does /site/assets/logs/errors.txt say?
  25. Yep. Happens so often here too. Should always remember to use var_dump($var) instead of echo, when doing quick debugging.
×
×
  • Create New...