Commit 0a4da18d authored by Olga Brani's avatar Olga Brani
Browse files

Dropkick large label fix

Style fixes
Project js validation fix
parent 6f4f69d8
......@@ -29,7 +29,7 @@
.form-row .dk_options a:hover,
.form-row .dk_option_current a { text-shadow:none; background-color: #fff; text-decoration:none; color:#F89A1C}
.form-row .dk_toggle { height:17px; overflow:hidden; }
.form-row .dk_toggle span { width:240px; overflow:hidden; display:block; }
.form-row .dk_toggle span { width:220px;white-space: nowrap; overflow: hidden; /*text-overflow: ellipsis;*/ display:block; }
/* end custom theme */
......
......@@ -236,8 +236,9 @@ table.alt-style tr td:first-child,
table.alt-style tr th:first-child { padding-left:5px; overflow:hidden; }
table.alt-style tr td a { margin:0; }
table.alt-style tr td:first-child a { margin:0; }
table.alt-style tr th.asc a { padding-right:20px; background:url(../images/arrow_th_bg.png) no-repeat right -48px; }
table.alt-style tr th.desc a { padding-right:20px; background:url(../images/arrow_th_bg.png) no-repeat right 6px; }
table.alt-style tr th a { padding-right:20px; }
table.alt-style tr th.asc a { background:url(../images/arrow_th_bg.png) no-repeat right -48px; }
table.alt-style tr th.desc a { background:url(../images/arrow_th_bg.png) no-repeat right 6px; }
.content a.submit { margin:0; display:inline-block; margin:10px 0 ; height:auto; min-width:100px; text-align:center;}
table.alt-style tr:nth-child(2n) td { background:#F2F2F2 }
dl.alt-style dt { width:30%; float:left; color:#3582AC; font-weight:normal;}
......
......@@ -78,7 +78,7 @@ $(document).ready(function() {
setContainerMinHeight('.container .wrapper');
tableFixedCols('my-projects', 30);
tableFixedCols('my-projects', 20);
$('.show-extra').click(function(e) {
e.preventDefault();
......
......@@ -8,8 +8,19 @@
* <http://twitter.com/JamieLottering>
*
*/
(function ($, window, document) {
function fixLabel (lbl){
if ( lbl.length > 30 ) {
return lbl.substring(0,30)+'...';
} else {
return lbl;
}
console.info(lbl.length);
}
var ie6 = false;
// Help prevent flashes of unstyled content
......@@ -108,7 +119,7 @@
data.label = $original.text();
data.options = $options;
}
data.label = fixLabel(data.label);
// Build the dropdown HTML
$dk = _build(dropdownTemplate, data);
......@@ -175,7 +186,7 @@
$current = $dk.find('li').first()
;
$dk.find('.dk_label').text(listData.label);
$dk.find('.dk_label').text(fixLabel(listData.label));
$dk.find('.dk_options_inner').animate({ scrollTop: 0 }, 0);
_setCurrent($current, $dk);
......@@ -263,7 +274,7 @@
$select = data.$select;
$select.val(value);
$dk.find('.dk_label').text(label);
$dk.find('.dk_label').text(fixLabel(label));
reset = reset || false;
......
......@@ -100,7 +100,7 @@ $(document).ready(function() {
// if you fill _proxy fields do stuff
$('.quotas-form .quota input[type="text"]').change(function () {
$('.quotas-form .quota input[type="text"]').keyup(function () {
if ( $('#icons span.info').hasClass('error-msg')){
$('#icons span.info').find('span').html('Here you add resources to your Project. Each resource you specify here, will be granted to *EACH* user of this Project. So the total resources will be: &lt;Total number of members&gt; * &lt;amount_of_resource&gt; for each resource.');
......@@ -194,8 +194,7 @@ $(document).ready(function() {
// validation actions for int fields
else {
var is_int = value.match (new RegExp('^[0-9]*$'));
var is_int = value.match (new RegExp('^[1-9][0-9]*$'));
if ( !is_int ){
$(this).parents('.form-row').find('.error-msg').html('Enter a positive integer');
$(this).parents('.form-row').addClass('with-errors');
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment