|
Lumpy posted:Why not store the URLs in the data attributes? Plus, you have a lot of markup you don't need... why are there DIVs in there at all? Here's a crappy example making LIs have different BG colors based on a data attribute: http://jsfiddle.net/kvvz6tj7/ In your example .each(), what does the idx argument accomplish? I removed it http://jsfiddle.net/kvvz6tj7/3/ and it still seems to function the same. Is it a best practice to put something there when you use .each()?
|
# ? Dec 2, 2014 23:43 |
|
|
# ? May 16, 2024 17:17 |
|
Raskolnikov2089 posted:In your example .each(), what does the idx argument accomplish? I removed it http://jsfiddle.net/kvvz6tj7/3/ and it still seems to function the same. Is it a best practice to put something there when you use .each()? I just stuck it in there out of habit. It's passed as the index of the array element you are currently iterating on. You are correct that it is unused and can be removed in my code.
|
# ? Dec 3, 2014 00:06 |
|
Blinkz0rz posted:Except WordPress which only really scales if you throw more horsepower at it. Try load-balancing it and see what happens. Hope you don't have anything stored in the media library! HyperDB yo (and nginx, memcached, etc) What part of WP doesn't scale as well as any other PHP CMS?
|
# ? Dec 3, 2014 00:54 |
|
If you're using Wordpress as a CMS to present a mostly static site, just throw a correctly configured instance of Varnish in front of it and you've got all the scalability you need. Examples of large websites using Wordpress: https://wordpress.org/showcase/flavor/wordpress-org/ Don't use a CMS platform if you're building an application. Don't write a fully featured CMS on an application platform, unless you really hate yourself. Or, you can also make a system which is a hybrid of both an application framework and Wordpress, if you like a challenge and also still hate yourself. Tool for a job, people.
|
# ? Dec 3, 2014 03:49 |
|
streetlamp posted:HyperDB yo (and nginx, memcached, etc) anything in wp-content
|
# ? Dec 3, 2014 04:19 |
|
And what I mean by that is that there's no really good way of putting common files (i.e. user uploads) on storage that's not on the server. Thus, you run the risk, if you're trying to load balance on AWS, for instance, of users uploading data that never gets propagated to other instances and gets wiped when the instances are pulled down. Also there's the whole "we store absolute links in the database" thing.
|
# ? Dec 3, 2014 04:22 |
|
I'm trying to achieve something fairly simple, but notoriously fiddly. I want to have select lists that are themed, but will still bring up the native select list UI on mobile. I have tried jQuery UI but that has it's own UI when the list is used, and not only that but it doesn't play nice with Angular. I tried Angular UI select lists but they don't work because they use a completely different syntax altogether so they won't fire the native select UI on mobile. Surely this is a common enough requirement that there's a solution somewhere already? Someone? Anyone?
|
# ? Dec 3, 2014 04:27 |
|
Blinkz0rz posted:And what I mean by that is that there's no really good way of putting common files (i.e. user uploads) on storage that's not on the server. Blinkz0rz posted:Also there's the whole "we store absolute links in the database" thing. Also are you trying to load-balance by subdomain or something? Shouldn't you be doing something like a round-robin with varnish? Bonus points for also offloading your cookies/sessions to another server. The Wizard of Poz posted:I want to have select lists that are themed, but will still bring up the native select list UI on mobile. I tried Angular UI select lists but they won't fire the native select UI on mobile.
|
# ? Dec 3, 2014 04:39 |
|
v1nce posted:Can you supply a basic fiddle that shows your problem? There's nothing I haven't been able to achieve using Select2 in AngularJS. Mind you, ui-select2 has some serious shortcomings when you try to do really crazy stuff. Actually that's a perfect example of the problem I'm facing. If you open that page on mobile and click on any of the "Select2" dropdowns, you don't get the same native control that you get if you click on the plain dropdown at the top. Example - this is what happens with a regular select list, you get this nice looking native UI to make your actual selection: This is what happens with the Select2 select list, you get given a custom selection UI that is awful to use on mobile. Not only that, but it doesn't understand touch screens so if you try to scroll down by dragging and you happen to start your gesture on the select list, you get this awkward interaction where the list opens up and your gesture is ignored. Basically I want something in the middle - I want the actual dropdown component to be themed via CSS, but for the native UI to be triggered when the select is tapped. putin is a cunt fucked around with this message at 05:02 on Dec 3, 2014 |
# ? Dec 3, 2014 04:55 |
|
Blinkz0rz posted:And what I mean by that is that there's no really good way of putting common files (i.e. user uploads) on storage that's not on the server. Like mirroring your uploads to a CDN and setting the upload_url_path option to point at it? e: Not even sure why Im defending WP, but like v1nce said tool for a job streetlamp fucked around with this message at 05:15 on Dec 3, 2014 |
# ? Dec 3, 2014 05:07 |
|
Nevermind, the issue I was having resolved itself; hoping this either doesn't happen again or I figure out what went wrong when I uploaded those css files.
yoyomama fucked around with this message at 05:58 on Dec 3, 2014 |
# ? Dec 3, 2014 05:17 |
|
The Wizard of Poz posted:If you open that page on mobile and click on any of the "Select2" dropdowns, you don't get the same native control that you get if you click on the plain dropdown at the top. Looks like that whole drag-opens-select thing is a bug with an unmerged fix. To get around it you can either pull that fix or wrap the element with a higher priority "touchstart" listener that prevents propagation if the device supports touch inputs. The Wizard of Poz posted:Basically I want something in the middle - I want the actual dropdown component to be themed via CSS, but for the native UI to be triggered when the select is tapped. Unfortunately I can't offer you anything in the middle. I'd argue that Select2 gives you a whole lot of extra awesomeness (typeahead, infinite scroll via ajax, etc) that it's worth trying to make it work. You can probably fix the whole tap-scroll thing by pulling down that fix, or as i said, wrapping it with a listener that prevents the operation. You can probably make it a whole lot more friendly to use on mobile by styling the pop-out box (positions, widths, etc), or using scrollTo on select2-open event, to move it to the top of the window. Maybe someone else can offer you better (easier) middle ground with another library, but I don't personally know of any.
|
# ? Dec 3, 2014 05:31 |
|
v1nce posted:I really only did a cursory google for this, but doesn't S3 Buckets take care of that? I've seen S3 Buckets before but don't you think it's overkill to have to install a whole different filesystem just to get WordPress to store user generated file system artifacts separate from the application? I was actually thinking about how you'd scale in AWS. Elastic Load Balancers let you spin up and shut down new instances based on load rather than having to maintain existing servers that may just go unused. If you're spinning up and shutting down servers user generated file system artifacts start to become a problem if a user uploads something on one instance but it never gets replicated across all of the instances. All I really want is for someone to abstract WordPress's file handling so that when a user uploads something it could go anywhere and it would be up to developers to write destination plugins. Also, next time you use WordPress take a look at the database. It actually stores the entire URL of resources in the database. To migrate from one domain to the other involves using a tool designed to do global find and replace in your database. That's pretty shoddy design, don't you think?
|
# ? Dec 3, 2014 14:06 |
Blinkz0rz posted:I've seen S3 Buckets before but don't you think it's overkill to have to install a whole different filesystem just to get WordPress to store user generated file system artifacts separate from the application? No? It's really easy to set up, and is pretty standard these days for many sites. quote:I was actually thinking about how you'd scale in AWS. Elastic Load Balancers let you spin up and shut down new instances based on load rather than having to maintain existing servers that may just go unused. If you're spinning up and shutting down servers user generated file system artifacts start to become a problem if a user uploads something on one instance but it never gets replicated across all of the instances. Why limit yourself to AWS? quote:All I really want is for someone to abstract WordPress's file handling so that when a user uploads something it could go anywhere and it would be up to developers to write destination plugins. http://wp-cli.org/
|
|
# ? Dec 3, 2014 14:12 |
|
down with slavery posted:No? It's really easy to set up, and is pretty standard these days for many sites. I've never used it. If it's as easy as you say definitely worth another look. quote:Why limit yourself to AWS? 'Cause that's where our infrastructure is hosted? Dynamic scaling is a thing and WordPress just doesn't place nicely with it. quote:http://wp-cli.org/ I know it and use it. I just think it's absurd to have to do a global find and replace for absolute urls in a database. That's terrible design. It would be simpler if they stored urls as relative and used the site url to assemble the full url.
|
# ? Dec 3, 2014 14:21 |
|
The Wizard of Poz posted:I'm trying to achieve something fairly simple, but notoriously fiddly. I want to have select lists that are themed, but will still bring up the native select list UI on mobile. I have tried jQuery UI but that has it's own UI when the list is used, and not only that but it doesn't play nice with Angular. I tried Angular UI select lists but they don't work because they use a completely different syntax altogether so they won't fire the native select UI on mobile. Check out this Codepen for a CSS only solution: http://codepen.io/ericrasch/pen/zjDBx This is how I handled it on my latest project. Basically you wrap the select in a <div>, hide the overflow, set the select width to a value greater than 100% and use a no-repeatable background for the styled arrow. I made a couple of slight modifications though, like positioning the arrow background with calc(). i.e.calc(100% - 20px) to position 20px from the right. Its cross-browser and the select box works as expected using the device's native controls, all without relying on JS. It also means the browser will handle edge cases such as the menu appearing outside the browser window if required (see http://www.hanseri.no/a-closer-look-at-the-select-element/) Heskie fucked around with this message at 15:19 on Dec 3, 2014 |
# ? Dec 3, 2014 15:14 |
|
v1nce posted:Don't use a CMS platform if you're building an application. Don't write a fully featured CMS on an application platform, unless you really hate yourself. This is a very fine quote, and one worth remembering.
|
# ? Dec 3, 2014 15:23 |
|
Edit: Wordpress is so much better than Blogger. Question answered. huhu fucked around with this message at 19:23 on Dec 3, 2014 |
# ? Dec 3, 2014 18:26 |
|
People still use Dreamweaver?
|
# ? Dec 3, 2014 19:12 |
|
revmoo posted:People still use Dreamweaver? I had to open it up two months ago to quickly deal with an old newsletter email I had to get content into. Today I just said "gently caress it" and used Sublime snippets to expedite remaking the entire thing in Zurb Ink. (screw HTML emails)
|
# ? Dec 3, 2014 19:21 |
|
My go-to solution for HTML emails these days is to say the following things to clients: 1) I will only use MailChimp. 2) You get one of X template options, which I will customize to a small degree (eg. MailChimp's designer templates with custom images and colors) 3) It costs about 10x my hourly rate. Amazingly, I still sell them. Trust me, just do this. But also yes, screw HTML emails.
|
# ? Dec 3, 2014 19:52 |
|
If you map a filesystem in Chrome's dev tools and start messing with the CSS values from mapped style sheets, it will save the changes automatically. That is, without me hitting a button that says "yes, I'd like to write this fuckery out to the file right now". It just obliterates whatever's there Good thing I found this out with a file I had open in the editor at the time cuz otherwise I'd be pissed. It does keep the structure of the file the same, but I use that UI as a scratch pad to mess around with changes that I don't want saved, so to me that's a totally irresponsible and insane decision - especially since there's apparently no explicit save. So heads up.
|
# ? Dec 3, 2014 21:14 |
|
Hello, web design champions! My shop writes mostly desktop software, but we're pushing our reporting module out to the browser. We're using ASP.NET to generate and display half a dozen reports. Currently the html is bare, just an <h2> here and a <table> there, filled with rows from our database. We're looking to pay someone to make it pretty (for some measurement of pretty), because we lack the knowledge and/or gumption to do it ourselves. Should I be looking to work with a photoshop guy to design the looks, give me a psd, and then take that to a pdf-to-html shop? Or am I looking for a guy who can both design it and write the html/css themselves (and what would his job title be)? Where are some good places to look for such people?
|
# ? Dec 3, 2014 21:21 |
|
epalm posted:Hello, web design champions! Someone to do both and PM me.
|
# ? Dec 3, 2014 21:23 |
|
The UX is done? Or it just wasn't cared about? Also could I charge your company a lot?
|
# ? Dec 3, 2014 21:33 |
|
Pretty ain't worth a thing if it's not usable.
|
# ? Dec 3, 2014 22:46 |
|
epalm posted:Hello, web design champions! I know it's totally outside what you're doing, but maybe take a look at http://www.geckoboard.com . We replaced probably 90% of our internal reporting with some well set up Geckoboards, and even if you don't use it you can steal the style/appearance.
|
# ? Dec 4, 2014 00:12 |
|
drat that is really cool. It could almost put me out of a job. Almost.
|
# ? Dec 4, 2014 00:42 |
|
Has anyone run into bugs with responsive states in Safari lately? I'm seeing a weird issue where the CSS for my states is being applied, but Safari is only rendering portions of it correctly. For example, my main navigation gets moved offscreen and receives a more touch-friendly treatment at mobile dimensions, but Safari is ignoring the positioning values. Using the inspector I can see that it's getting the right CSS, it's just not using it. Any ideas? Excessive browser resizing is sort of an edge case in my opinion, but this is driving me crazy and I'd like to fix it. No clue what to google. e: Oh I forgot to mention, this only happens when I resize the window. If I refresh, everything renders correctly. But if I resize after the page has finished loading, poo poo be hosed. kedo fucked around with this message at 01:03 on Dec 4, 2014 |
# ? Dec 4, 2014 00:59 |
|
So another project has landed in my lap... My new job is shoehorning a completely unsuitable software solution to bend to its will and its causing me headaches... Its a simple use case. We collect your vehicle and pay you for it. So I am looking for the easiest way to develop an online app (current one is not online) where we, and the customer can add their details and book a collection. Now I can do it in php from scratch, my last project went that way and works fine, but wondered if their is a boilerplate for this sort of thing? Some features we need are: sending job to drivers smart phones, only allowing a certain amount of booking a day, separated by AM/PM, driver can upload image with proof of ID on it and we can store this. So any ideas?
|
# ? Dec 4, 2014 22:10 |
|
So today Zurb have launched Foundation for Apps, "The first front-end framework created for developing fully responsive web apps." Anybody tried it yet? It relies on Flexbox so IE9 and down aren't supported, and the examples actually seem quite buggy so far - but it is a first release, hopefully they can iron all that out and get something more usable soon.
|
# ? Dec 4, 2014 22:29 |
|
thegasman2000 posted:So another project has landed in my lap... My new job is shoehorning a completely unsuitable software solution to bend to its will and its causing me headaches... Don't know if your scale is appropriate to it, but maybe check out Schedulicity: https://www.schedulicity.com/ It looks like a directory, but you can embed their booking button on your site/app and control booking intervals, availability, etc. If you're googling around for existing code to adapt, the most common scenario I've seen for this is in hair salon bookings. A quick run at sourceforge ("appointment management") found me this: http://sourceforge.net/projects/wass/?source=directory You could probably find others on GitHub The 'heavy' work is going to be the scheduling/conflict/availability, so it's understandable you'd want to avoid re-inventing the wheel on it unless you don't have to.
|
# ? Dec 4, 2014 22:37 |
|
Scaramouche posted:[Good Words...] Thanks, yeah the availability bit has me worried... I think we wan to set a hard limit on bookings. So 10 before AM and 10 after. Only AM on saturdays. When 10 have been booked the user needs to not be able to select that date/time slot. I will have a look at hair appointments as that makes sense. Any ideas on storing the images and writing the location to the database. I presume this is the best way. Bloody government requirement means they need to be kept for 10 years. Currently doing 120 ish cars a week.
|
# ? Dec 4, 2014 22:43 |
|
Heskie posted:Check out this Codepen for a CSS only solution: http://codepen.io/ericrasch/pen/zjDBx Holy poo poo, this is perfect! Thank you! Where would you like to meet to receive your blowjob?
|
# ? Dec 4, 2014 22:43 |
|
I'm trying to come up with a good IE8 fallback for inline SVG. For whatever reason IE8 doesn't simply ignore the <svg> tags, it throws a poo poo fit when it sees one and stops rendering the page correctly. So far I see two viable options. The first one is outlined here. Conditional comments to block the <svg> tags from IE8 and load the fallback .png. Fine, but conditional comments are gross. The second option is to use Modernizr (which I'm already using on the site for a couple other features). Basically, inject the <svg> into the page via JavaScript using Modernizr.inlinesvg. Supported browsers get the code, unsupported browsers get the fallback. This should work, but is it overkill? Which of these is the better option?
|
# ? Dec 9, 2014 23:07 |
|
I have an impossible error. My company's service relies on a POST AJAX call, and for some reason the call body isn't always populating correctly. I can't reproduce it, but my boss keeps finding errors where the call goes through without the data that should be attached. I'm pretty sure it's not just IE flipping out over CORS, because in that case we shouldn't get a call at all, not just half of one like this. I doubt it's somebody with JS turned off, because again, we shouldn't get a call at all in that case. And it's definitely not legit, because if there isn't data to send, we shouldn't even be calling the service. What the hell kind of errors would cause a POST call to be sent without a body like this?
|
# ? Dec 10, 2014 00:44 |
|
Have you tried logging the failing requests to see if there's any pattern in the user agents or anything else? Are you sure they're not actually OPTIONS requests being used to preflight things?
|
# ? Dec 10, 2014 01:52 |
|
caiman posted:The second option is to use Modernizr (which I'm already using on the site for a couple other features). Basically, inject the <svg> into the page via JavaScript using Modernizr.inlinesvg. Supported browsers get the code, unsupported browsers get the fallback. This should work, but is it overkill? Yeah, do this. If you throw in conditional markup just for IE8 it's going to be a shambles to deal with in future, and you're using a solution that only works for one specific case. On the other hand, Modernizr was built for dealing with browsers that are missing features, and will detect a failure to understand SVG on the browser and use the fallback. Plus in the future if you decide to drop support for browsers that don't understand SVG then you can just find+replace the calls to Modernizr and you're done. darthbob88 posted:I have an impossible error. My company's service relies on a POST AJAX call, and for some reason the call body isn't always populating correctly. Is the POST data completely empty or just mangled? Do you have anything like logged devtools (F12) headers to look at? Check the "Content-Type" header because, depending on your server-side framework, the different content types can end up in different parts of your request object. For instance, in Symfony Content-Type: x-www-form-urlencoded populates variables in the Request object that can be fetched using ->get(), but Content-Type: application/json is only accessible via getContent(). That's also the difference between jQuery's $.ajax and AngularJS's $http service. In Symfony you can add an interceptor to massage the data: http://silex.sensiolabs.org/doc/cookbook/json_request_body.html Or in Angular you can override the Content-Type: http://victorblog.com/2012/12/20/make-angularjs-http-service-behave-like-jquery-ajax/ But now I'm just making wild assumptions about your front/back end. Also, this should be pretty reproducible on the troubled machine if it's the case. If not, we could really use a look at the headers for the failed request.
|
# ? Dec 10, 2014 02:42 |
|
Jabor posted:Have you tried logging the failing requests to see if there's any pattern in the user agents or anything else? quote:Are you sure they're not actually OPTIONS requests being used to preflight things? v1nce posted:Is the POST data completely empty or just mangled? Do you have anything like logged devtools (F12) headers to look at? quote:Also, this should be pretty reproducible on the troubled machine if it's the case. If not, we could really use a look at the headers for the failed request.
|
# ? Dec 10, 2014 02:51 |
|
|
# ? May 16, 2024 17:17 |
|
caiman posted:SVG and IE8 I'm looking at SVG's at the moment and came across this fallback technique: code:
code:
edit: Found a CSS Tricks list of SVG information, pretty handy since all my Googling was filled with pages of SVG Icon sets rather than useful info. Heskie fucked around with this message at 12:44 on Dec 10, 2014 |
# ? Dec 10, 2014 11:44 |