Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
revmoo
May 25, 2006

#basta

Withnail posted:

Does anyone have a good solution for fixed table headers (scrolling table body) that works in IE9?

I can't believe my googling sucks that bad.

What about DataTables?

Adbot
ADBOT LOVES YOU

Withnail
Feb 11, 2004
We are using angular which I don't think plays well with the jquery datatables...

Maluco Marinero
Jan 18, 2001

Damn that's a
fine elephant.

Withnail posted:

We are using angular which I don't think plays well with the jquery datatables...

You can use a directive to wrap where you would put your data table. Use attributes on that directive and then let jquery do its thing inside it.

In the template.
code:

<div ng-datatable="dataTableData"></div>

Creating the directive, look up the actual synatx for hooking it up though.
code:

function () {
  return {
    restrict: 'A',
    link: function(scope, elem, attrs) {
      var data = scope.$eval(attrs.ngDatatable);
      // apply to datatables to $(elem) here
    }
  }

}


Phone posting so that nay not work, but that's the general structure you want for your directive maybe, and then just let the directive handle all the jquery stuff in there.

DimpledChad
May 14, 2002
Rigging elections since '87.
https://github.com/lorenzofox3/Smart-Table is also an option, it's a pre-built table directive and offers that feature. I also like ngTable but it hasn't had any commits for 6 months so...

Edit: not sure about IE9 though, but it's worth checking out.

obstipator
Nov 8, 2009

by FactsAreUseless
If datatables doesnt work for you, these might help:
http://salzerdesign.com/test/fixedTable.html

I do a similar thing to one of those where I use CSS content :before's to make fake versions of the thead and they stay in place fine.

enthe0s
Oct 24, 2010

In another few hours, the sun will rise!

streetlamp posted:

I really like this as an introduction http://eloquentjavascript.net/
and its free to read online!

Awesome, I'll check it out. Thanks!

Heskie
Aug 10, 2002
I'm rebuilding an e-commerce store I built about 5 years ago which supported IE6. Analytics for the last 12 months says IE usage is very low and dropping.

Since November 2013:
  • IE7 (0.15%)
  • IE8 (1.11%)
  • IE9 (1.05%)
  • IE10 (1.56%)
  • IE11 (2.68%)

Since April 2014:
  • IE7 (0.19%)
  • IE8 (0.80%)
  • IE9 (1.00%)
  • IE10 (0.75%)
  • IE11 (3.87%)

(The overall hits are like 300/day, so its a small percentage of a small number)

It was a bit of a suprise. I'd originally set out to support IE8 but after looking at the stats I'm not so sure? It'd be nice to actually use stuff like Flexbox on a real project, but I'm hesitant as I'm used to supporting IE7/8.

Would you regard these numbers low enough to drop IE7-10 support?

Heskie fucked around with this message at 11:36 on Nov 10, 2014

Funking Giblet
Jun 28, 2004

Jiglightful!
Do you have the conversion rates of each?

The Dave
Sep 9, 2003

That's exactly what I was going to ask. If that portion of IE users represents 0 dollars then don't waste the development time on them.

Heskie
Aug 10, 2002

Funking Giblet posted:

Do you have the conversion rates of each?

Unfortunately not but thats a good point. Setting up proper e-commerce Analytics support is one of the big things on my todo list.

Its a handcrafted jewellery store and fashion blog. A lot of the traffic are on Macs, smartphones and tablets so I'm going to go out on a limb and predict legacy IE sales to be low to zero. Safari (in-app) has a higher usage than all versions of IE combined. One of the big reasons for the redesign is the site is 5 years old and unresponsive. Its funny, I remember at the time using a HTML5 doctype was cutting edge :science:

At this point I feel like I'm begging the question and just looking for permission :shobon:

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

Heskie posted:

the site is 5 years old and unresponsive.

It never occurred to me to wonder what the opposite of "a responsive design" is. I'm not sure unresponsive fits very well (though obviously I knew what you meant), is there another term that people use?

bpower
Feb 19, 2011
I've just finished my first month in web dev after years in desktop client/server stuff. Jesus Christ theres so much to learn :psyduck:.

Heskie
Aug 10, 2002

pokeyman posted:

It never occurred to me to wonder what the opposite of "a responsive design" is. I'm not sure unresponsive fits very well (though obviously I knew what you meant), is there another term that people use?

Heh yeah. I was struggling to word it but 'non-responsive' and 'is not responsive' are just as bad and sound as if the website is down.

bpower posted:

I've just finished my first month in web dev after years in desktop client/server stuff. Jesus Christ theres so much to learn :psyduck:.

I hope you like package managers!

karms
Jan 22, 2006

by Nyc_Tattoo
Yam Slacker

pokeyman posted:

It never occurred to me to wonder what the opposite of "a responsive design" is. I'm not sure unresponsive fits very well (though obviously I knew what you meant), is there another term that people use?

"Not designed responsively"

Maluco Marinero
Jan 18, 2001

Damn that's a
fine elephant.

pokeyman posted:

It never occurred to me to wonder what the opposite of "a responsive design" is. I'm not sure unresponsive fits very well (though obviously I knew what you meant), is there another term that people use?

2000 - Table Layouts
2005 - Fixed Layouts
Now - Responsive Layouts

Noah
May 31, 2011

Come at me baby bitch
I have a Google Forms/Sheets problem.
a) Beginner skill level.
b) Javascript
c) JSFiddle: http://jsfiddle.net/uyh592vc/

Here is what I'm trying to do:

Every time a new Google Form is submitted and the entry is added to Google Sheets, I want an email generated with the data found in the cells. That aspect is working, the problem I am running into is when the Google Form dumps data into the Sheet. Right now, Sheets drops the leading zeros from the cell no matter what I seem to be able to do. So instead, I tried to run a script to format the cells to add the leading zeros back. That worked, however, the script that pulls the data from the cell is ignoring the formatting, and uses the intrinsic value of the cell.

How can I tell the email script to either pull the formatted value, OR grab the intrinsic value and add leading zeros back into it for the email body?

Spatulater bro!
Aug 19, 2003

Punch! Punch! Punch!

Mozilla released Firefox Developer Edition, and I must say it's wonderful. I'm a long time Chrome user, but this just might make me switch camps, at least for dev tasks. Having a dev-specific browser just makes a ton of sense.

The Merkinman
Apr 22, 2007

I sell only quality merkins. What is a merkin you ask? Why, it's a wig for your genitals!
Is there a good resource for creating a Style Guide? I've done some Googling and found stuff like A List Apart, but didn't know if there were any sites/documentation that people here liked.

Maluco Marinero
Jan 18, 2001

Damn that's a
fine elephant.

The Merkinman posted:

Is there a good resource for creating a Style Guide? I've done some Googling and found stuff like A List Apart, but didn't know if there were any sites/documentation that people here liked.

I'm assuming you mean front end style guide, aka pattern library, to be inundated with choice look at https://github.com/davidhund/styleguide-generators/blob/master/README.md, but whatever's suitable really depends on the workflow its fitting into. Sometimes it's easier to wire it up yourself.

karms
Jan 22, 2006

by Nyc_Tattoo
Yam Slacker

Noah posted:

I have a Google Forms/Sheets problem.

...

How can I tell the email script to either pull the formatted value, OR grab the intrinsic value and add leading zeros back into it for the email body?

I don't know what you did to 'force' the leading zeroes, but you can add them back in with some js if you know how long they need to be:

JavaScript code:
...

  var ss = SpreadsheetApp.getActiveSpreadsheet();
  var sheet = ss.getSheets()[0];
  var cell = sheet.getRange('D:D');
  var pad = "000000"; // add as much zeroes as you need to

...

if ( e.namedValues[key] && (e.namedValues[key] != "") ) {
        var value = ( pad + e.namedValues[key] ).slice( -pad.length ); // this will add the zeroes back
        message += key + ' :: '+ value + "\n\n"; 
      }

...

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



pokeyman posted:

It never occurred to me to wonder what the opposite of "a responsive design" is. I'm not sure unresponsive fits very well (though obviously I knew what you meant), is there another term that people use?

I get "broken on my phone" a lot

Noah
May 31, 2011

Come at me baby bitch

KARMA! posted:

I don't know what you did to 'force' the leading zeroes, but you can add them back in with some js if you know how long they need to be:


The var pad doesn't seem to alter anything on the Google Sheet. The cell.setNumberFormat only seems to do an aesthetic formatting, when I look at the value it is still missing the leading zeros, but visually looks like they are there. http://imgur.com/J5wPpiD like this.

pipes!
Jul 10, 2001
Nap Ghost

The Merkinman posted:

Is there a good resource for creating a Style Guide? I've done some Googling and found stuff like A List Apart, but didn't know if there were any sites/documentation that people here liked.

I'd really recommend using a living styleguide. Personally, I prefer KSS.

zfleeman
Mar 12, 2014

I wonder how you spell Tabasco.
I started messing with Bootstrap 3 last night, and I'm a little lost: is there a way to make columns rigid? I want to make a site that doesn't move around all antsy-like.

revmoo
May 25, 2006

#basta

zfleeman posted:

I started messing with Bootstrap 3 last night, and I'm a little lost: is there a way to make columns rigid? I want to make a site that doesn't move around all antsy-like.

You probably either don't actually want Bootstrap or you're using it in a way that it wasn't intended for.

The Dave
Sep 9, 2003

revmoo posted:

You probably either don't actually want Bootstrap or you're using it in a way that it wasn't intended for.

Well that's sort of a harsh conclusion to jump to so quickly. Maybe he just wants to use container-fluid. Another thing to consider with breakpoints: Your actual users are probably never resizing the width of their browsers while on your site.

v1nce
Sep 19, 2004

Plant your brassicas in may and cover them in mulch.
Yeah, what revmoo said. Bootstrap is supposed to give you a responsive layout so on different scales (desktop, tablet, mobile) you can have the appropriate layout, making your content readable and usable. You're supposed to develop the responsive versions in tandem with the desktop version.

If, for some 2003 reason you don't want that, you can just give your column instructions in the smallest scale, using "col-xs-<size>". That means "this size and up, use this column size".
If you're doing this because "I'll do the mobile version later", then you're doing it wrong, and you are creating more work for yourself.

If you're just learning Bootstrap and it's not for commercial purposes, give Foundation a look, too. It's supposed to lead you in a "mobile-first" kind of way, and shared a lot of similarities with Bootstrap, and is worth your time giving a try.

kedo
Nov 27, 2007

I am so tired of a bazillion front-end frameworks and clients asking me to learn new ones to code their silly sites that don't even need a framework.

gently caress frameworks, that's what I say.

Maluco Marinero
Jan 18, 2001

Damn that's a
fine elephant.

kedo posted:

I am so tired of a bazillion front-end frameworks and clients asking me to learn new ones to code their silly sites that don't even need a framework.

gently caress frameworks, that's what I say.

I just got asked to quote for a job where a Bootstrap was specified, yet with all custom designs. I said it would be done using LESS and developed into a living style guide for documentation, but hosed if I'm gonna let a framework control my markup and CSS. :colbert: feels good man. We shall see whether I get the job of course, glowing recommendations from the project manager help with that though.

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

I like frameworks because the whole css/html/js/different browsers/screen sizes/blahblahblah web environment is poo poo and I don't want to deal with it. A framework will let me put out something that looks decent until the project gets to the point we can hire some insane person that actually enjoys dealing with the whole toxic mess.

I certainly get why it's irritating to expect someone to do a totally custom design, "but in this framework we're already using".

lunar detritus
May 6, 2009


Most of the reason to use Bootstrap and similar frameworks is the grid and you can get that on its own without all the other cruft.

kedo
Nov 27, 2007

Thermopyle posted:

I like frameworks because the whole css/html/js/different browsers/screen sizes/blahblahblah web environment is poo poo and I don't want to deal with it.

Yeah, that definitely is the main benefit. But christ, I'd rather just use something like Susy for a grid system and then code the drat thing from scratch for about 99% of projects in the world, unless the design is literally "We took Foundation/Bootstrap/whatever default styles and designed a page with them." As long as you don't code like an idiot it's probably going to work fine back to at least IE 8.

Then again, maybe I'm just not the target audience for Frameworks. The client who has asked me to use them a lot lately is a design firm I'm freelancing with and their most techie-coder-fellow is an okay coder, but I get the feeling he'd prefer things just work as opposed to thinking about them too much.

gmq posted:

Most of the reason to use Bootstrap and similar frameworks is the grid and you can get that on its own without all the other cruft.

Exactly. Susy! SUSY! I love it.


Maluco Marinero posted:

I just got asked to quote for a job where a Bootstrap was specified, yet with all custom designs. I said it would be done using LESS and developed into a living style guide for documentation, but hosed if I'm gonna let a framework control my markup and CSS. :colbert: feels good man. We shall see whether I get the job of course, glowing recommendations from the project manager help with that though.

Five bucks says they have some in-house guy who only knows Bootstrap, or he's actually an IT guy being press ganged into maintaining the site who could only do five minutes of research to see what the current hotness is with front-end frameworks.

karms
Jan 22, 2006

by Nyc_Tattoo
Yam Slacker

Noah posted:

The var pad doesn't seem to alter anything on the Google Sheet. The cell.setNumberFormat only seems to do an aesthetic formatting, when I look at the value it is still missing the leading zeros, but visually looks like they are there. http://imgur.com/J5wPpiD like this.

It won't do anything to the stylesheet but it will make the mail work, though.

jackpot
Aug 31, 2004

First cousin to the Black Rabbit himself. Such was Woundwort's monument...and perhaps it would not have displeased him.<
I've got a guy whose emails aren't coming in because he's over his disk usage (Warning! This account has reached its disk usage quota).

I go to "disk space usage" in cpanel, and everything looks totally fine until I get to public_html and holy poo poo, it's 11gb. But once you start looking in public_html of course there are hundreds of folders and subfolders - is there something I can do that'll let me see all the files in public_html, so that I can tell where his problem's coming from? He says he thinks it's from undeleted email backups, but christ, 11gb? I don't know anything about all this, but it sounds like something's writing to a log file a million times a day or something. Any ideas, either on what might be the problem or how to find out where the problem is (without methodically looking in every drat folder)?

edit: Nevermind, I found it; it's just some really big WP backups going back a year.

kedo posted:

Is your .css.map where it should be?
I'll bet it's not and I'll check that out, thanks.

jackpot fucked around with this message at 02:56 on Nov 11, 2014

streetlamp
May 7, 2007

Danny likes his party hat
He does not like his banana hat

kedo posted:

Exactly. Susy! SUSY! I love it.

Amen, god bless and hail satan. Probably my favorite thing I use every day.

zfleeman
Mar 12, 2014

I wonder how you spell Tabasco.
Thanks, guys. I'll check out Susy. I really do just want the grid system. Bootstrap was just the first framework I messed around a few years ago, and I was probably using it incorrectly because acquainting myself with 3.0 is really throwing me off.

v1nce posted:

If, for some 2003 reason you don't want that, you can just give your column instructions in the smallest scale, using "col-xs-<size>". That means "this size and up, use this column size".
If you're doing this because "I'll do the mobile version later", then you're doing it wrong, and you are creating more work for yourself.

I dunno, I'm just really new to web development and design and I don't really care about mobile. I don't think about it all that often.

pipes!
Jul 10, 2001
Nap Ghost

zfleeman posted:

I dunno, I'm just really new to web development and design and I don't really care about mobile. I don't think about it all that often.

You should probably start thinking about it all the time.

substitute
Aug 30, 2003

you for my mum

zfleeman posted:

I dunno, I'm just really new to web development and design and I don't really care about mobile. I don't think about it all that often.

http://motherfuckingwebsite.com

zfleeman
Mar 12, 2014

I wonder how you spell Tabasco.

This actually helped my mood a lot. This is pretty much a one hour a week hobby of mine, and I already feel so behind. Whenever I load the source to a lot of pages, I feel like I will never learn or catch up to how people do things these days.

Adbot
ADBOT LOVES YOU

Heskie
Aug 10, 2002

kedo posted:

Exactly. Susy! SUSY! I love it.

Susy is great though I still find it a little restrictive. I spent ages trying to create a very simple masonry layout (gallery grid but with some items spanning 2 rows, fluid widths, fixed gutters). Eventually I conceded and manually built it with CSS/Sass in 5 minutes.

I don't know if its because I'm very comfortable with CSS or I've not quite 'got' grid frameworks, but is that something you've ever come across?

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply