Code: Select all
/*Button Style*/
.win-button {
display: inline-block;
padding: 6px 12px;
margin-bottom: 0;
font-size: 14px;
font-weight: 400;
line-height: 1.42857143;
text-align: center;
white-space: nowrap;
vertical-align: middle;
touch-action: manipulation;
cursor: pointer;
user-select: none;
background-image: none;
border-radius: 4px;
min-width: 150px;
}
.win-button-primary {
color: #fff;
background-color: #0072cf;
border: 1px solid #0072cf;
}
.win-button-primary:hover {
background-color: #00569c;
border: 1px solid #00569c;
}
.win-button-primary:active {
background-color: #00569c;
border: 1px solid #00569c;
box-shadow: none;
}
.win-button-secondary {
color: #0072cf;
background-color: #fff;
border: 1px solid #0072cf;
}
.win-button-secondary:hover {
color: #004883;
border: 1px solid #004883;
}
.win-button-secondary:active {
color: #004883;
border: 1px solid #004883;
box-shadow: none;
}
.win-button-tertiary {
color: #fff;
background-color: #c00;
border: 1px solid #c00;
}
.win-button-tertiary:hover {
background-color: #b30000;
border: 1px solid #b30000;
}
.win-button-tertiary:active {
background-color: #900;
border: 1px solid #900;
box-shadow: none;
}
.win-button-big {
min-height: 50px;
font-size: 18px;
border-radius: 6px;
border-width: 2px;
}
.win-button-big:hover {
border-width: 2px;
cursor: pointer;
}
.win-button:disabled {
cursor: not-allowed;
opacity: .65;
}
.win-button-big:disabled {
cursor: not-allowed;
opacity: .65;
}
.win-button-primary[disabled = true] {
color: #fff;
background-color: #0072cf;
border: 1px solid #0072cf;
}
.win-button-secondary[disabled = true] {
color: #0072cf;
background-color: #fff;
border: 1px solid #0072cf;
}
.win-button-tertiary[disabled = true] {
color: #fff;
background-color: #c00;
border: 1px solid #c00;
}
.win-button-big[disabled = true] {
border-width: 2px;
cursor: not-allowed;
}
.win-action-button {
border: 1px solid #ccc;
font-size: 17px;
border-radius:25px;
height: 34px;
color: #0072cf;
background: #fff;
padding: 4px 12px;
font-weight: normal;
text-align: center;
display: inline-block;
margin-bottom: 0px;
white-space: nowrap;
user-select: none;
}
.win-action-button:hover {
color: #0072cf;
border-color: #0072cf;
}
.win-action-button:active {
color: #0072cf;
border-color: #0072cf;
box-shadow: inset 0 1px 3px rgba(0,0,0,0.125);
background-image: none;
}
.win-action-button:disabled {
cursor: not-allowed;
opacity: .65;
}
.win-action-button[disabled = true] {
color: #0072cf;
background-color: #fff;
border: 1px solid #ccc;
}
.win-close-icon {
color: gray; /*TODO:*/
font-family: "FontAwesome";
font-size: 24px;
}
.win-image{
background-position: 13px;
}
.win-button.win-action-button.win-image{
padding-left: 30px;
}
/*-------------------------------------------------------------------------------------*/
/*End Button Style*/
/*Button Group Styles*/
label {
display: inline-block;
max-width: 100%;
margin-bottom: 5px;
font-weight: 700;
}
.btn-group, .btn-group-vertical {
position: relative;
display: inline-block;
vertical-align: middle;
}
.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle) {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
}
.btn-group>.btn:first-child {
margin-left: 0;
}
.win-button-group .btn {
white-space: normal;
}
.btn-group-vertical>.btn, .btn-group>.btn {
position: relative;
float: left;
}
.win-button-group label {
font-weight: bold;
font-size: 13px;
}
.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle) {
border-radius: 0;
}
.btn-group>.btn:last-child:not(:first-child), .btn-group>.dropdown-toggle:not(:first-child) {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}
.win-button-group .btn:active, .win-button-group .btn.active {
-webkit-box-shadow: none;
box-shadow: none;
background-color: #0072cf;
color: #fff;
border: 1px solid #0072cf;
}
.btn-group-vertical>.btn.active, .btn-group-vertical>.btn:active, .btn-group-vertical>.btn:focus, .btn-group-vertical>.btn:hover, .btn-group>.btn.active, .btn-group>.btn:active, .btn-group>.btn:focus, .btn-group>.btn:hover {
z-index: 2;
}
.btn-group .btn+.btn, .btn-group .btn+.btn-group, .btn-group .btn-group+.btn, .btn-group .btn-group+.btn-group {
margin-left: -1px;
}
.btn-default.active, .btn-default:active, .open>.dropdown-toggle.btn-default {
background-image: none;
}
.btn {
display: inline-block;
padding: 6px 12px;
margin-bottom: 0;
font-size: 14px;
font-weight: 400;
line-height: 1.42857143;
text-align: center;
white-space: nowrap;
vertical-align: middle;
-ms-touch-action: manipulation;
touch-action: manipulation;
cursor: pointer;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
background-image: none;
/*border: 1px solid transparent*/
border-radius: 4px;
}
[data-toggle=buttons]>.btn input[type=radio]{
position: absolute;
clip: rect(0,0,0,0);
pointer-events: none;
}
/*--------------------------------------------------------------------------------------------*/
/*End Button Group Styles*/
Here is the .js file:
Code: Select all
pui.retrieveCustomLayoutTemplate("buttongroup");
pui.addCustomProperty({
name: "buttongroup",
help: "",
controls: ["buttongroup","btn-group win-button-group","btn btn-default win-button win-button-secondary"],
category: ""
});
pui.widgets.add({
name: "button group",
newId: "buttongroup",
defaults: {
"width": "",
"height":""
},
propertySetters: {
"field type": function(params) {
var html = pui.layout.templates["buttongroup"];
params.dom.innerHTML = html;
var body = params.dom.getElementsByClassName("buttongroup");
},
}
});
pui.toolbox.add({
category: "CSS Buttons",
widget: "button group",
text: "buttongroup",
value:"test",
proxyHeight: 23,
proxyWidth: 72,
proxyHTML: pui.layout.templates["buttongroup"],
defaults: {
"width": "",
"height": "",
}
});
Code: Select all
<div class="buttongroup">
<div class=" btn-group win-button-group" role="group" data-toggle="buttons">
<label class="btn btn-default win-button win-button-secondary">
<input type="radio" id="option1" autocomplete="off" name="options">Left
</label>
<label class="btn btn-default win-button win-button-secondary">
<input type="radio" id="option2" autocomplete="off" name="options">Middle
</label>
<label class="btn btn-default win-button win-button-secondary">
<input type="radio" id="option3" autocomplete="off" name="options">Right
</label>
</div>
</div>
I personally did not code all of this I am just trying to figure out why it is not working as we want it to.
Thanks,
Sondra