pimp up mod new_channel

This commit is contained in:
Mario Vavti
2016-02-19 22:28:21 +01:00
parent 5a7b994e59
commit 02e82e496e
8 changed files with 64 additions and 235 deletions
+2 -171
View File
@@ -1,172 +1,3 @@
h2 {
margin-left: 15%;
margin-top: 5%;
.descriptive-paragraph {
margin-top: 10px;
}
#newchannel-form {
font-size: 1.4em;
margin-left: 15%;
margin-top: 20px;
width: 50%;
}
#newchannel-form .descriptive-paragraph {
color: #888;
margin-left: 20px;
margin-bottom: 25px;
}
.newchannel-label {
float: left;
width: 275px;
}
.newchannel-role-morehelp {
float: left;
width: 32px;
}
.newchannel-input {
float: left;
width: 275px;
padding: 5px;
}
.newchannel-feedback {
float: left;
margin-left: 5px;
}
.newchannel-field-end {
clear: both;
margin-bottom: 20px;
}
/**
* Stylish Select 0.4.9 - $ plugin to replace a select drop down box with a stylable unordered list
* http://github.com/scottdarby/Stylish-Select/
*
* Copyright (c) 2009 Scott Darby
*
* Requires: jQuery 1.3 or newer
*
* Dual licensed under the MIT and GPL licenses.
*/
/**
* Hide lists on page load
---------------------------------------------------------*/
.stylish-select .SSContainerDivWrapper {
left:-9999px;
}
/*
* Red example
---------------------------------------------------------*/
.stylish-select .SSContainerDivWrapper {
margin:0;
padding:0;
width:290px;
position:absolute;
top:22px;
left:0;
z-index:9999;
font-size: 60%;
line-height: 1.1;
}
.stylish-select a {
font-weight: normal !important;
}
.stylish-select ul.newList {
margin:0;
padding:0;
list-style:none;
color:#000;
background:#fff;
border:1px solid #ccc;
overflow:auto;
}
.stylish-select ul.newList * {
margin:0;
padding:0;
}
.stylish-select ul.newList a {
color: #000;
text-decoration:none;
display:block;
padding:3px 8px;
}
.stylish-select .newListSelected {
width:285px;
color:#000;
height:19px;
padding:3px 0 0 6px;
float:left;
background:url(select-bg.png) no-repeat;
}
.stylish-select ul.newList li a:focus {
-moz-outline-style: none;
}
.stylish-select .selectedTxt {
width:258px;
overflow:hidden;
height:18px;
font-size: 90%;
padding:0 23px 0 0;
}
.stylish-select .hiLite {
background:#650101!important;
color:#fff!important;
}
.stylish-select .newListHover {
background:#ccc!important;
color:#000!important;
cursor:default;
}
.stylish-select .newListDisabled {
opacity: 0.6;
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=60)";
filter: alpha(opacity=60);
}
.stylish-select .newListItemDisabled {
opacity: 0.6;
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=60)";
filter: alpha(opacity=60);
}
.stylish-select .newListOptionDisabled {
opacity: 0.6;
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=60)";
filter: alpha(opacity=60);
}
.stylish-select .newListSelHover,
.stylish-select .newListSelFocus {
background-position:0 -22px;
cursor:default;
}
.stylish-select .newListOptionTitle {
font-weight:bold;
}
.stylish-select .newListOptionTitle ul {
margin:3px 0 0;
}
.stylish-select .newListOptionTitle li {
font-weight:normal;
}
+7 -6
View File
@@ -1,19 +1,20 @@
$(document).ready(function() {
// $("#id_permissions_role").sSelect();
$("#newchannel-name").blur(function() {
$("#id_name").blur(function() {
$("#name-spinner").spin('small');
var zreg_name = $("#newchannel-name").val();
var zreg_name = $("#id_name").val();
$.get("new_channel/autofill.json?f=&name=" + encodeURIComponent(zreg_name),function(data) {
$("#newchannel-nickname").val(data);
$("#id_nickname").val(data);
zFormError("#newchannel-name-feedback",data.error);
$("#name-spinner").spin(false);
});
});
$("#newchannel-nickname").blur(function() {
$("#id_nickname").blur(function() {
$("#nick-spinner").spin('small');
var zreg_nick = $("#newchannel-nickname").val();
var zreg_nick = $("#id_nickname").val();
$.get("new_channel/checkaddr.json?f=&nick=" + encodeURIComponent(zreg_nick),function(data) {
$("#newchannel-nickname").val(data);
$("#id_nickname").val(data);
zFormError("#newchannel-nickname-feedback",data.error);
$("#nick-spinner").spin(false);
});
-1
View File
@@ -1 +0,0 @@
[template]full[/template]
+1
View File
@@ -1544,6 +1544,7 @@ nav .dropdown-menu {
.section-content-tools-wrapper .section-content-danger-wrapper,
.section-content-wrapper .section-content-danger-wrapper {
margin-bottom: 10px;
border-bottom: none;
border-radius: $radiuspx;
}
+31 -37
View File
@@ -1,42 +1,36 @@
<div class="generic-content-wrapper-styled">
<h2>{{$title}}</h2>
<div class="generic-content-wrapper">
<div class="section-title-wrapper">
<h2>{{$title}}</h2>
</div>
<div class="section-content-wrapper">
<div class="section-content-info-wrapper">
{{$desc}}
</div>
{{if $channel_usage_message}}
<div class="section-content-warning-wrapper">
{{$channel_usage_message}}
</div>
{{/if}}
<form action="new_channel" method="post" id="newchannel-form">
{{if $default_role}}
<input type="hidden" name="permissions_role" value="{{$default_role}}" />
{{else}}
{{include file="field_select_grouped.tpl" field=$role}}
{{/if}}
<form action="new_channel" method="post" id="newchannel-form" class="stylish-select">
{{include file="field_input.tpl" field=$name}}
<div id="newchannel-name-feedback" class="newchannel-feedback"></div>
<div id="name-spinner"></div>
<div id="newchannel-desc" class="descriptive-paragraph">{{$desc}}</div>
{{include file="field_input.tpl" field=$nickname}}
<div id="newchannel-nickname-feedback" class="newchannel-feedback"></div>
<div id="nick-spinner"></div>
{{if $default_role}}
<input type="hidden" name="permissions_role" value="{{$default_role}}" />
{{else}}
<div id="newchannel-role-help" class="descriptive-paragraph">{{$help_role}}</div>
{{include file="field_select_grouped.tpl" field=$role}}
<div id="newchannel-role-end" class="newchannel-field-end"></div>
{{/if}}
<input type="submit" name="submit" id="newchannel-submit-button" value="{{$submit}}" />
<div id="newchannel-submit-end" class="clear"></div>
<label for="newchannel-name" id="label-newchannel-name" class="newchannel-label" >{{$label_name}}</label>
<input type="text" name="name" id="newchannel-name" class="newchannel-input" value="{{$name}}" />
<div id="name-spinner"></div>
<div id="newchannel-name-feedback" class="newchannel-feedback"></div>
<div id="newchannel-name-end" class="newchannel-field-end"></div>
<div id="newchannel-name-help" class="descriptive-paragraph">{{$help_name}}</div>
<label for="newchannel-nickname" id="label-newchannel-nickname" class="newchannel-label" >{{$label_nick}}</label>
<input type="text" name="nickname" id="newchannel-nickname" class="newchannel-input" value="{{$nickname}}" />
<div id="nick-spinner"></div>
<div id="newchannel-nick-desc" class="descriptive-paragraph">{{$nick_hub}}</div>
<div id="newchannel-nickname-feedback" class="newchannel-feedback"></div>
<div id="newchannel-nickname-end" class="newchannel-field-end"></div>
<div id="newchannel-nick-desc" class="descriptive-paragraph">{{$nick_desc}}</div>
<div id="newchannel-import-link" class="descriptive-paragraph" >{{$label_import}}</div>
<div id="newchannel-import-end" class="newchannel-field-end"></div>
<input type="submit" name="submit" id="newchannel-submit-button" value="{{$submit}}" />
<div id="newchannel-submit-end" class="newchannel-field-end"></div>
</form>
<div id="newchannel-import-link" class="descriptive-paragraph" >{{$label_import}}</div>
<div id="newchannel-import-end" class="clear"></div>
</form>
</div>
</div>