From 441f300cdfd66990903063219e9b0b420b681428 Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Mon, 13 Jun 2011 00:59:09 +0200 Subject: [PATCH] Options centering. --- 4chan_x.user.js | 46 +++++++++++++++++++++-------------------- script.coffee | 55 ++++++++++++++++++++++++------------------------- 2 files changed, 51 insertions(+), 50 deletions(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index f38c41f10..46e0292c7 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -960,11 +960,12 @@ var arr, checked, description, dialog, hiddenNum, hiddenThreads, html, input, key, li, link, main, obj, ul, _i, _j, _len, _len2, _ref, _ref2, _ref3; hiddenThreads = $.getValue("hiddenThreads/" + g.BOARD + "/", {}); hiddenNum = Object.keys(g.hiddenReplies).length + Object.keys(hiddenThreads).length; - html = "

"; - dialog = ui.dialog('options', { - top: '25%', - left: '25%' - }, html); + html = "
main | sauce | time
support throd | github | uso | donate

"; + dialog = $.el('div', { + id: 'options', + className: 'reply dialog', + innerHTML: html + }); main = $('#main', dialog); _ref = config.main; for (key in _ref) { @@ -2682,25 +2683,34 @@ #options {\ position: fixed;\ padding: 5px;\ - min-width: 500px;\ + max-height: 70%;\ + width: 50%;\ + top: 15%;\ + left: 25%;\ + overflow: auto;\ }\ - #options .move, #credits {\ + #floaty {\ + float: left;\ + }\ + #credits {\ text-align: right;\ }\ #options ul {\ list-style: none;\ padding: 0;\ }\ - #floaty {\ - float: left;\ - }\ #options textarea {\ - height: 100px;\ + height: 200px;\ width: 100%;\ + resize: none;\ }\ - #options #main {\ - overflow: auto;\ - height: 450px;\ + .overlay {\ + position: fixed;\ + width: 100%;\ + height: 100%;\ + top: 0;\ + left: 0;\ + background-color: rgba(0,0,0,.5);\ }\ \ #qr {\ @@ -2786,14 +2796,6 @@ .inlined {\ opacity: .5;\ }\ - .overlay {\ - position: fixed;\ - width: 100%;\ - height: 100%;\ - top: 0;\ - left: 0;\ - background-color: rgba(0,0,0,.5);\ - }\ ' }; main.init(); diff --git a/script.coffee b/script.coffee index 19adb312a..f52898507 100644 --- a/script.coffee +++ b/script.coffee @@ -722,16 +722,14 @@ options = hiddenThreads = $.getValue "hiddenThreads/#{g.BOARD}/", {} hiddenNum = Object.keys(g.hiddenReplies).length + Object.keys(hiddenThreads).length html = " -
-
- main | sauce | time -
-
- support throd | - github | - uso | - donate -
+
+ main | sauce | time +
+
+ support throd | + github | + uso | + donate

@@ -760,7 +758,7 @@ options =
" - dialog = ui.dialog 'options', top: '25%', left: '25%', html + dialog = $.el 'div', id: 'options', className: 'reply dialog', innerHTML: html main = $('#main', dialog) for key, obj of config.main ul = $.el 'ul', @@ -2052,25 +2050,34 @@ main = #options { position: fixed; padding: 5px; - min-width: 500px; + max-height: 70%; + width: 50%; + top: 15%; + left: 25%; + overflow: auto; } - #options .move, #credits { + #floaty { + float: left; + } + #credits { text-align: right; } #options ul { list-style: none; padding: 0; } - #floaty { - float: left; - } #options textarea { - height: 100px; + height: 200px; width: 100%; + resize: none; } - #options #main { - overflow: auto; - height: 450px; + .overlay { + position: fixed; + width: 100%; + height: 100%; + top: 0; + left: 0; + background-color: rgba(0,0,0,.5); } #qr { @@ -2156,14 +2163,6 @@ main = .inlined { opacity: .5; } - .overlay { - position: fixed; - width: 100%; - height: 100%; - top: 0; - left: 0; - background-color: rgba(0,0,0,.5); - } ' main.init()