Commit f5dd2f07 by kevalbhatt

ATLAS-2189 : IE-9 Alignment Issues

parent 4bf2ebb4
...@@ -193,12 +193,14 @@ module.exports = function(grunt) { ...@@ -193,12 +193,14 @@ module.exports = function(grunt) {
sass: { sass: {
dist: { dist: {
files: { files: {
'dist/css/style.css': 'public/css/scss/style.scss' 'dist/css/style.css': 'public/css/scss/style.scss',
'dist/css/login.css': 'public/css/scss/login.scss'
} }
}, },
build: { build: {
files: { files: {
'dist/css/style.css': 'dist/css/scss/style.scss' 'dist/css/style.css': 'dist/css/scss/style.scss',
'dist/css/login.css': 'dist/css/scss/login.scss'
} }
} }
}, },
......
...@@ -15,26 +15,56 @@ ...@@ -15,26 +15,56 @@
* limitations under the License. * limitations under the License.
*/ */
/* latin */
/* source-sans-pro-regular - latin */
@font-face { @font-face {
font-family: 'Source Sans Pro'; font-family: 'Source Sans Pro';
font-style: normal; font-style: normal;
font-weight: 400; font-weight: 400;
src: local('Source Sans Pro'), local('SourceSansPro-Regular'), url(../js/external_lib/fonts/ODelI1aHBYDBqgeIAH2zlNV_2ngZ8dMf8fLgjYEouxg.woff2) format('woff2'); src: url('../js/external_lib/fonts/source-sans-pro/source-sans-pro-v10-latin-regular.eot');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215; /* IE9 Compat Modes */
src: local('Source Sans Pro Regular'), local('SourceSansPro-Regular'),
url('../js/external_lib/fonts/source-sans-pro/source-sans-pro-v10-latin-regular.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('../js/external_lib/fonts/source-sans-pro/source-sans-pro-v10-latin-regular.woff2') format('woff2'), /* Super Modern Browsers */
url('../js/external_lib/fonts/source-sans-pro/source-sans-pro-v10-latin-regular.woff') format('woff'), /* Modern Browsers */
url('../js/external_lib/fonts/source-sans-pro/source-sans-pro-v10-latin-regular.ttf') format('truetype'), /* Safari, Android, iOS */
url('../js/external_lib/fonts/source-sans-pro/source-sans-pro-v10-latin-regular.svg#SourceSansPro') format('svg');
/* Legacy iOS */
} }
/* latin */
/* source-sans-pro-600 - latin */
@font-face { @font-face {
font-family: 'Source Sans Pro'; font-family: 'Source Sans Pro';
font-style: normal; font-style: normal;
font-weight: 600; font-weight: 600;
src: local('Source Sans Pro Semibold'), local('SourceSansPro-Semibold'), url(../js/external_lib/fonts/toadOcfmlt9b38dHJxOBGCOFnW3Jk0f09zW_Yln67Ac.woff2) format('woff2'); src: url('../js/external_lib/fonts/source-sans-pro/source-sans-pro-v10-latin-600.eot');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215; /* IE9 Compat Modes */
src: local('Source Sans Pro SemiBold'), local('SourceSansPro-SemiBold'),
url('../js/external_lib/fonts/source-sans-pro/source-sans-pro-v10-latin-600.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('../js/external_lib/fonts/source-sans-pro/source-sans-pro-v10-latin-600.woff2') format('woff2'), /* Super Modern Browsers */
url('../js/external_lib/fonts/source-sans-pro/source-sans-pro-v10-latin-600.woff') format('woff'), /* Modern Browsers */
url('../js/external_lib/fonts/source-sans-pro/source-sans-pro-v10-latin-600.ttf') format('truetype'), /* Safari, Android, iOS */
url('../js/external_lib/fonts/source-sans-pro/source-sans-pro-v10-latin-600.svg#SourceSansPro') format('svg');
/* Legacy iOS */
} }
/* source-sans-pro-700 - latin */
@font-face { @font-face {
font-family: 'Source Sans Pro'; font-family: 'Source Sans Pro';
font-style: normal; font-style: normal;
font-weight: 700; font-weight: 700;
src: local('Source Sans Pro Bold'), local('SourceSansPro-Bold'), url(../js/external_lib/fonts/toadOcfmlt9b38dHJxOBGEo0As1BFRXtCDhS66znb_k.woff2) format('woff2'); src: url('../js/external_lib/fonts/source-sans-pro/source-sans-pro-v10-latin-700.eot');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215; /* IE9 Compat Modes */
} src: local('Source Sans Pro Bold'), local('SourceSansPro-Bold'),
url('../js/external_lib/fonts/source-sans-pro/source-sans-pro-v10-latin-700.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('../js/external_lib/fonts/source-sans-pro/source-sans-pro-v10-latin-700.woff2') format('woff2'), /* Super Modern Browsers */
url('../js/external_lib/fonts/source-sans-pro/source-sans-pro-v10-latin-700.woff') format('woff'), /* Modern Browsers */
url('../js/external_lib/fonts/source-sans-pro/source-sans-pro-v10-latin-700.ttf') format('truetype'), /* Safari, Android, iOS */
url('../js/external_lib/fonts/source-sans-pro/source-sans-pro-v10-latin-700.svg#SourceSansPro') format('svg');
/* Legacy iOS */
}
\ No newline at end of file
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
body {
font-family: 'Source Sans Pro', sans-serif;
background-color: #f6f7fb;
color: #686868;
}
a {
color: #359f89;
}
button:focus {
outline: none !important;
}
/* Bootstrap Extended */
.form-control:focus {
box-shadow: none;
}
.errorBox {
position: absolute;
right: 36px;
display: none;
top: 26px;
width: 251px;
}
.errorBox .alert {
box-shadow: 4px 3px 8px -2px gray;
}
.close {
padding: 6px;
font-size: 15px;
}
/* Login Page */
.login-pane {
/*margin-top: 50px;*/
background: #323544;
color: #eee;
padding: 15px;
border-radius: 5px;
}
.login-pane h2 {
margin-bottom: 40px;
}
.login-pane .input-group {
margin: 20px 0px;
}
.login-pane .form-control,
.login-pane .input-group-addon {
background-color: transparent;
border-radius: 0px;
}
.login-pane .form-control {
border-left: none;
color: #eee;
}
.login-pane .form-control:focus {
border-color: #CCC;
}
.login-pane .input-group-addon {
border-right: none;
color: #ccc;
}
.login-pane .form-control:focus + .input-group-addon {
border-color: #66afe9;
}
.login-pane .btn-atlas {
background-color: #37bb9b;
color: #fff;
}
/* Login Page */
.login-pane {
top: 25%;
width: 40%;
left: 30%;
position: fixed;
background: #323544;
color: #eee;
padding: 15px;
border-radius: 5px;
}
.login-pane h2 {
margin-bottom: 40px;
}
.login-pane .input-group {
margin: 20px 0px;
}
.login-pane .form-control,
.login-pane .input-group-addon {
background-color: transparent;
border-radius: 0px;
}
.login-pane .form-control {
border-left: none;
color: #eee;
}
.login-pane .form-control:focus {
border-color: #CCC;
}
.login-pane .input-group-addon {
border-right: none;
color: #ccc;
}
.login-pane .form-control:focus + .input-group-addon {
border-color: #66afe9;
}
.login-pane .btn-atlas {
padding: 10px 20px;
background-color: #37bb9b;
color: #fff;
border: 1px #37bb9b solid;
border-radius: 4px;
-webkit-transition: all .3s ease;
-moz-transition: all .3s ease;
transition: all .3s ease;
}
...@@ -16,16 +16,22 @@ ...@@ -16,16 +16,22 @@
* limitations under the License. * limitations under the License.
*/ */
//fonts
/* main.scss */ $font_0: Source Sans Pro;
$font_1: sans-serif;
//common color $font_2: FontAwesome;
$font_3: Helvetica;
$font_4: Arial;
$font_5: sans-serf;
//Colors
$white: #fff; $white: #fff;
$black: #000;
$red: #f00;
$gray: #808080;
$dark_gray:#666;
$action_gray:#999999; $action_gray:#999999;
$color_keppel_approx: #37bb9b; $color_keppel_approx: #37bb9b;
$color_gallery_approx: #eee; $color_gallery_approx: #eee;
$gray: #808080;
$dark_gray:#666;
$color_tuna_approx: #323544; $color_tuna_approx: #323544;
$color_celeste_approx: #ccc; $color_celeste_approx: #ccc;
$color_cornflower_blue_approx: #66afe9; $color_cornflower_blue_approx: #66afe9;
...@@ -34,33 +40,17 @@ $color_jungle_green_approx: #38BB9B; ...@@ -34,33 +40,17 @@ $color_jungle_green_approx: #38BB9B;
$color_jungle_green_light:#7ed3be; $color_jungle_green_light:#7ed3be;
$color_froly_approx: #ee6e73; $color_froly_approx: #ee6e73;
$color_manatee_approx: #9398a0; $color_manatee_approx: #9398a0;
$black: #000;
$color_havelock_blue_approx: #4a90e2; $color_havelock_blue_approx: #4a90e2;
$color_ironside_gray_approx: #686868; $color_ironside_gray_approx: #686868;
$color_mercury_approx: #e6e6e6; $color_mercury_approx: #e6e6e6;
$color_whisper_approx: #f6f7fa; $color_whisper_approx: #f6f7fa;
$color_bombay_approx: #b5b9bc; $color_bombay_approx: #b5b9bc;
$red: #f00;
//theme color
//colors
$color_white_lilac_approx: #f6f7fb; $color_white_lilac_approx: #f6f7fb;
$color_puerto_rico_approx: #3dd4af; $color_puerto_rico_approx: #3dd4af;
$color_star_dust_approx: #9a9a9a; $color_star_dust_approx: #9a9a9a;
$color_mirage_approx: #1c1e2a; $color_mirage_approx: #1c1e2a;
$concrete: #f2f2f2; $concrete: #f2f2f2;
$lightGrey:#e1e2e4; //fonts $lightGrey:#e1e2e4;
$font_0: Source Sans Pro;
$font_1: sans-serif;
$font_2: FontAwesome;
//fonts
/* $font_0: PT Sans;
$font_1: sans-serif;
$font_2: Helvetica Neue; */
$font_3: Helvetica;
$font_4: Arial;
$font_5: sans-serf;
//old - style color //old - style color
$color_bali_hai_approx: #8fa5b1; $color_bali_hai_approx: #8fa5b1;
$transparent:transparent; $transparent:transparent;
...@@ -105,46 +95,6 @@ $color_suva_gray_approx: #868686; ...@@ -105,46 +95,6 @@ $color_suva_gray_approx: #868686;
$tag_color:#4A90E2; $tag_color:#4A90E2;
$delete_link:#BB5838; $delete_link:#BB5838;
//urls //urls
$url_0: url(img/loading.gif); $url_0: url(../img/loading.gif);
$switchTransition: .4s ease-out;
.readOnly { $switchTransition: .4s ease-out;
span, \ No newline at end of file
button,
a {
i {
&.fa-trash[data-guid] {
display: none;
}
&.fa-trash[data-id="delete"] {
display: none;
}
}
&.btn[data-id="addTag"] {
display: none;
}
&.editbutton[data-id="editButton"] {
display: none !important;
}
&[data-id="delete"],
&[data-id="edit"] {
display: none;
}
&.btn[data-id="addTerm"] {
display: none;
}
&.btn[data-id="tagClick"] {
span {
display: block;
padding: 3px 5px 3px 5px;
}
i.fa-close[data-id="deleteTag"],
i.fa-times[data-id="deleteTag"],
i.fa-times[data-id="delete"] {
display: none;
}
}
}
}
\ No newline at end of file
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* common.scss */
.readOnly {
span,
button,
a {
i {
&.fa-trash[data-guid] {
display: none;
}
&.fa-trash[data-id="delete"] {
display: none;
}
}
&.btn[data-id="addTag"] {
display: none;
}
&.editbutton[data-id="editButton"] {
display: none !important;
}
&[data-id="delete"],
&[data-id="edit"] {
display: none;
}
&.btn[data-id="addTerm"] {
display: none;
}
&.btn[data-id="tagClick"] {
span {
display: block;
padding: 3px 5px 3px 5px;
}
i.fa-close[data-id="deleteTag"],
i.fa-times[data-id="deleteTag"],
i.fa-times[data-id="delete"] {
display: none;
}
}
}
}
\ No newline at end of file
...@@ -19,7 +19,18 @@ ...@@ -19,7 +19,18 @@
/* login.scss */ /* login.scss */
//colors @import "__variable.scss";
body {
font-family: $font_0, $font_1;
background-color: $color_white_lilac_approx;
color: $color_ironside_gray_approx;
}
a {
color: $color_jungle_green_approx;
}
.errorBox { .errorBox {
position: absolute; position: absolute;
right: 36px; right: 36px;
...@@ -27,7 +38,6 @@ ...@@ -27,7 +38,6 @@
top: 26px; top: 26px;
width: 251px; width: 251px;
.alert { .alert {
//Instead of the line below you could use @include box-shadow($shadow-1, $shadow-2, $shadow-3, $shadow-4, $shadow-5, $shadow-6, $shadow-7, $shadow-8, $shadow-9, $shadow-10)
box-shadow: 4px 3px 8px -2px $gray; box-shadow: 4px 3px 8px -2px $gray;
} }
} }
...@@ -42,22 +52,24 @@ ...@@ -42,22 +52,24 @@
width: 40%; width: 40%;
left: 30%; left: 30%;
position: fixed; position: fixed;
padding: 15px;
background: $color_tuna_approx; background: $color_tuna_approx;
color: $color_gallery_approx; color: $color_gallery_approx;
padding: 15px; //Instead of the line below you could use @include border-radius($radius, $vertical-radius) padding: 15px;
border-radius: 5px; border-radius: 5px;
h2 { h2 {
margin-bottom: 40px; margin-bottom: 40px;
} }
.input-group { .input-group {
margin: 20px 0; margin: 20px 0;
width: 100%;
} }
.form-control { .form-control {
background-color: transparent; //Instead of the line below you could use @include border-radius($radius, $vertical-radius) background-color: transparent;
border-radius: 0; border-radius: 0;
border-left: none; border-left: none;
color: $color_gallery_approx; color: $color_gallery_approx;
float: left;
width: 94%;
&:focus { &:focus {
border-color: $color_celeste_approx; border-color: $color_celeste_approx;
+.input-group-addon { +.input-group-addon {
...@@ -66,26 +78,29 @@ ...@@ -66,26 +78,29 @@
} }
} }
.input-group-addon { .input-group-addon {
background-color: transparent; //Instead of the line below you could use @include border-radius($radius, $vertical-radius) background-color: transparent;
border-radius: 0; border-radius: 0;
border-right: none; border-right: none;
color: $color_celeste_approx; color: $color_celeste_approx;
float: left;
width: 6%;
line-height: 20px;
height: 34px;
} }
.btn-atlas { .btn-atlas {
padding: 10px 20px; padding: 10px 20px;
background-color: $color_keppel_approx; background-color: $color_keppel_approx;
color: $white; color: $white;
border: 1px $color_keppel_approx solid; //Instead of the line below you could use @include border-radius($radius, $vertical-radius) border: 1px $color_keppel_approx solid;
border-radius: 4px; //Instead of the line below you could use @include transition($transition-1, $transition-2, $transition-3, $transition-4, $transition-5, $transition-6, $transition-7, $transition-8, $transition-9, $transition-10) border-radius: 4px;
transition: all .3s ease; transition: all .3s ease;
} }
} }
button:focus { button:focus {
outline: none !important; outline: 0!important;
} }
.form-control:focus { .form-control:focus {
//Instead of the line below you could use @include box-shadow($shadow-1, $shadow-2, $shadow-3, $shadow-4, $shadow-5, $shadow-6, $shadow-7, $shadow-8, $shadow-9, $shadow-10)
box-shadow: none; box-shadow: none;
} }
\ No newline at end of file
...@@ -287,6 +287,11 @@ td { ...@@ -287,6 +287,11 @@ td {
.query-builder { .query-builder {
.rule-container { .rule-container {
margin: 6px 0; margin: 6px 0;
.rule-header {
.rule-actions {
padding: 7px 0px;
}
}
.rule-value-container { .rule-value-container {
display: inline-block !important; display: inline-block !important;
} }
...@@ -357,4 +362,9 @@ div.columnmanager-dropdown-container { ...@@ -357,4 +362,9 @@ div.columnmanager-dropdown-container {
border-top: 1px solid #DEDEDE; border-top: 1px solid #DEDEDE;
} }
} }
}
.ui-pnotify-icon,
.ui-pnotify-icon span {
padding: 2px 0px;
} }
\ No newline at end of file
...@@ -17,7 +17,8 @@ ...@@ -17,7 +17,8 @@
*/ */
@import "__mixin.scss"; @import "__mixin.scss";
@import "main.scss"; @import "__variable.scss";
@import "common.scss";
@import "tab.scss"; @import "tab.scss";
@import "form.scss"; @import "form.scss";
@import "nav.scss"; @import "nav.scss";
......
...@@ -120,6 +120,18 @@ header { ...@@ -120,6 +120,18 @@ header {
} }
} }
.sm-title {
line-height: 30px;
}
.md-title {
line-height: 34px;
}
.lg-title {
line-height: 40px;
}
a { a {
color: $color_jungle_green_approx; color: $color_jungle_green_approx;
&:focus { &:focus {
...@@ -166,6 +178,7 @@ hr[size="10"] { ...@@ -166,6 +178,7 @@ hr[size="10"] {
.table { .table {
margin-bottom: 2px; margin-bottom: 2px;
background-color: $white; background-color: $white;
max-width: none;
.table { .table {
width: auto; width: auto;
} }
......
...@@ -106,6 +106,9 @@ function getBaseUrl() { ...@@ -106,6 +106,9 @@ function getBaseUrl() {
} }
$(function() { $(function() {
// register handlers // register handlers
if (!('placeholder' in HTMLInputElement.prototype)) {
$("#username , #password").placeholder();
}
$('#signIn').on('click', function() { $('#signIn').on('click', function() {
$('#signIn').attr('disabled', true); $('#signIn').attr('disabled', true);
$('#signInLoading').css("visibility", "visible"); $('#signInLoading').css("visibility", "visible");
...@@ -128,4 +131,4 @@ $(function() { ...@@ -128,4 +131,4 @@ $(function() {
$(e.target).parent().removeClass('error'); $(e.target).parent().removeClass('error');
} }
}); });
}); });
\ No newline at end of file
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
</div> --> </div> -->
<div data-id="{{guid}}" class="item"> <div data-id="{{guid}}" class="item">
<div class="tools"> <div class="tools">
<i class="fa fa-ellipsis-h tagPopover" data-original-title="" title="" data-id=""></i> <i class="fa fa-ellipsis-h saveSearchPopover" data-original-title="" title="" data-id=""></i>
</div> </div>
<a href="javascript:void(0)">{{name}}</a> <a href="javascript:void(0)">{{name}}</a>
</div> </div>
\ No newline at end of file
...@@ -15,11 +15,12 @@ ...@@ -15,11 +15,12 @@
* limitations under the License. * limitations under the License.
--> -->
<div class="inline-content add-seperator"> <div class="inline-content add-seperator">
<div class="inline"> <div class="clearfix">
<h4>Favorite Search</h4></div> <span class="sm-title">Favorite Searches</span>
<div class="pull-right"> <div class="pull-right">
<button type="button" class="btn btn-action btn-sm" disabled="disabled" data-id="saveBtn">Save</button> <button type="button" class="btn btn-action btn-sm" disabled="disabled" data-id="saveBtn">Save</button>
<button type="button" class="btn btn-action btn-sm" data-id="saveAsBtn">Save As</button> <button type="button" class="btn btn-action btn-sm" data-id="saveAsBtn">Save As</button>
</div>
</div> </div>
</div> </div>
<span class="gray-text noFavoriteSearch">You don't have any favorite search.</span> <span class="gray-text noFavoriteSearch">You don't have any favorite search.</span>
......
...@@ -37,4 +37,4 @@ define(['require'], function(require) { ...@@ -37,4 +37,4 @@ define(['require'], function(require) {
response: {} response: {}
} }
return Globals; return Globals;
}); });
\ No newline at end of file
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
* limitations under the License. * limitations under the License.
*/ */
define(['require', 'utils/Enums', 'utils/Utils'], function(require, Enums, Utils) { define(['require', 'utils/Enums', 'utils/Utils', 'underscore'], function(require, Enums, Utils) {
'use strict'; 'use strict';
var UrlLinks = { var UrlLinks = {
......
...@@ -38,12 +38,16 @@ define(['require', 'utils/Globals', 'pnotify', 'utils/Messages', 'utils/Enums', ...@@ -38,12 +38,16 @@ define(['require', 'utils/Globals', 'pnotify', 'utils/Messages', 'utils/Enums',
Utils.generatePopover = function(options) { Utils.generatePopover = function(options) {
if (options.el) { if (options.el) {
return options.el.popover(_.extend({ var defaultObj = {
placement: 'auto bottom', placement: 'auto bottom',
html: true, html: true,
animation: false, animation: false,
template: '<div class="popover fixed-popover fade bottom"><div class="arrow"></div><h3 class="popover-title"></h3><div class="' + (options.contentClass ? options.contentClass : '') + ' popover-content"></div></div>' container: 'body'
}, options.popoverOptions)); };
if (options.viewFixedPopover || options.contentClass) {
defaultObj.template = '<div class="popover ' + (options.viewFixedPopover ? 'fixed-popover' : '') + ' fade bottom"><div class="arrow"></div><h3 class="popover-title"></h3><div class="' + (options.contentClass ? options.contentClass : '') + ' popover-content"></div></div>';
}
return options.el.popover(_.extend(defaultObj, options.popoverOptions));
} }
} }
...@@ -72,7 +76,7 @@ define(['require', 'utils/Globals', 'pnotify', 'utils/Messages', 'utils/Enums', ...@@ -72,7 +76,7 @@ define(['require', 'utils/Globals', 'pnotify', 'utils/Messages', 'utils/Enums',
Utils.getBaseUrl = function(url) { Utils.getBaseUrl = function(url) {
return url.replace(/\/[\w-]+.(jsp|html)|\/+$/ig, ''); return url.replace(/\/[\w-]+.(jsp|html)|\/+$/ig, '');
}; };
pnotify.prototype.options.styling = "bootstrap3"; pnotify.prototype.options.styling = "fontawesome";
var notify = function(options) { var notify = function(options) {
return new pnotify(_.extend({ return new pnotify(_.extend({
icon: true, icon: true,
......
...@@ -195,9 +195,10 @@ define(['require', ...@@ -195,9 +195,10 @@ define(['require',
that.renderBreadcrumb(); that.renderBreadcrumb();
Utils.generatePopover({ Utils.generatePopover({
el: that.$('[data-id="showMoreLess"]'), el: that.$('[data-id="showMoreLess"]'),
container: that.$el,
contentClass: 'popover-tag', contentClass: 'popover-tag',
viewFixedPopover: true,
popoverOptions: { popoverOptions: {
container: null,
content: function() { content: function() {
return $(this).find('.popup-tag').children().clone(); return $(this).find('.popup-tag').children().clone();
} }
......
...@@ -175,6 +175,11 @@ define(['require', ...@@ -175,6 +175,11 @@ define(['require',
not_null: 'is not null' not_null: 'is not null'
} }
}, },
icons: {
add_rule: 'fa fa-plus',
remove_rule: 'fa fa-times',
error: 'fa fa-exclamation-triangle'
},
rules: rules_widgets rules: rules_widgets
}); });
this.$('.rules-group-header .btn-group.pull-right.group-actions').toggleClass('pull-right pull-left'); this.$('.rules-group-header .btn-group.pull-right.group-actions').toggleClass('pull-right pull-left');
......
...@@ -560,9 +560,10 @@ define(['require', ...@@ -560,9 +560,10 @@ define(['require',
this.hideLoader(); this.hideLoader();
Utils.generatePopover({ Utils.generatePopover({
el: this.$('[data-id="showMoreLess"]'), el: this.$('[data-id="showMoreLess"]'),
container: this.$el,
contentClass: 'popover-tag', contentClass: 'popover-tag',
viewFixedPopover: true,
popoverOptions: { popoverOptions: {
container: null,
content: function() { content: function() {
return $(this).find('.popup-tag').children().clone(); return $(this).find('.popup-tag').children().clone();
} }
......
...@@ -41,24 +41,16 @@ define(['require', ...@@ -41,24 +41,16 @@ define(['require',
return events; return events;
}, },
initialize: function(options) { initialize: function(options) {
_.extend(this, _.pick(options, 'collection', 'typeHeaders', 'applyValue', 'fetchFavioriteCollection', 'isBasic', 'classificationDefCollection', 'entityDefCollection')); _.extend(this, _.pick(options, 'collection', 'typeHeaders', 'applyValue', 'fetchFavioriteCollection', 'isBasic', 'classificationDefCollection', 'entityDefCollection','searchTypeObj'));
this.model.id = this.model.get('guid'); this.model.id = this.model.get('guid');
this.model.idAttribute = 'guid'; this.model.idAttribute = 'guid';
this.searchTypeObj = {
'searchType': 'dsl',
'dslChecked': 'true'
}
if (this.isBasic) {
this.searchTypeObj.dslChecked = false;
this.searchTypeObj.searchType = 'basic';
}
}, },
onRender: function() { onRender: function() {
this.showToolTip(); this.showToolTip();
}, },
stateChange: function() { stateChange: function() {
this.applyValue(this.model, this.searchTypeObj); this.applyValue(this.model, this.searchTypeObj);
this.trigger('item:clicked'); this.trigger('item:clicked'); // to enable save button
this.ui.stateChange.parent('li').addClass('active').siblings().removeClass('active'); this.ui.stateChange.parent('li').addClass('active').siblings().removeClass('active');
}, },
modelEvents: { modelEvents: {
...@@ -67,72 +59,17 @@ define(['require', ...@@ -67,72 +59,17 @@ define(['require',
showToolTip: function(e) { showToolTip: function(e) {
var that = this; var that = this;
Utils.generatePopover({ Utils.generatePopover({
el: this.$('.tagPopover'), el: this.$('.saveSearchPopover'),
container: this.$el, viewFixedPopover: true,
popoverOptions: { popoverOptions: {
content: function() { content: function() {
return "<ul class='saveSearchPopoverList'>" + return "<ul class='saveSearchPopoverList_" + (that.isBasic ? 'isBasic' : 'isAdvance') + "' data-id=" + that.model.id + ">" +
"<li class='listTerm' ><i class='fa fa-search'></i> <a href='javascript:void(0)' data-fn='onSearch'>Search </a></li>" + "<li class='listTerm' ><i class='fa fa-search'></i> <a href='javascript:void(0)' data-fn='onSearch'>Search </a></li>" +
"<li class='listTerm' ><i class='fa fa-pencil'></i> <a href='javascript:void(0)' data-fn='onRename'>Rename</a></li>" + "<li class='listTerm' ><i class='fa fa-pencil'></i> <a href='javascript:void(0)' data-fn='onRename'>Rename</a></li>" +
"<li class='listTerm' ><i class='fa fa-trash-o'></i> <a href='javascript:void(0)' data-fn='onDelete'>Delete</a></li>" + "<li class='listTerm' ><i class='fa fa-trash-o'></i> <a href='javascript:void(0)' data-fn='onDelete'>Delete</a></li>" +
"</ul>"; "</ul>";
} }
} }
}).parent('div.tools').on('click', 'li', function(e) {
e.stopPropagation();
that.$('.tagPopover').popover('hide');
that[$(this).find('a').data('fn')](e)
});
},
onSearch: function() {
var searchParameters = this.model.toJSON().searchParameters,
params = CommonViewFunction.generateUrlFromSaveSearchObject({
value: searchParameters,
classificationDefCollection: this.classificationDefCollection,
entityDefCollection: this.entityDefCollection
});
Utils.setUrl({
url: '#!/search/searchResult',
urlParams: _.extend({}, this.searchTypeObj, params),
mergeBrowserUrl: false,
trigger: true,
updateTabState: true
});
},
onRename: function() {
var that = this;
require([
'views/search/save/SaveModalLayoutView'
], function(SaveModalLayoutView) {
new SaveModalLayoutView({ 'selectedModel': that.model, 'collection': that.collection, 'getValue': that.getValue, 'isBasic': that.isBasic });
});
},
onDelete: function() {
var that = this;
var notifyObj = {
modal: true,
html: true,
text: Messages.conformation.deleteMessage + "<b>" + this.model.get('name') + "</b>" + " ?",
ok: function(argument) {
that.onDeleteNotifyOk();
},
cancel: function(argument) {}
}
Utils.notifyConfirm(notifyObj);
},
onDeleteNotifyOk: function() {
var that = this;
this.model.urlRoot = UrlLinks.saveSearchApiUrl();
this.model.destroy({
wait: true,
success: function(model, data) {
if (that.collection) {
that.collection.remove(data);
}
Utils.notifySuccess({
content: that.model.get('name') + Messages.deleteSuccessMessage
});
}
}); });
} }
}); });
......
...@@ -44,7 +44,8 @@ define(['require', ...@@ -44,7 +44,8 @@ define(['require',
isBasic: this.isBasic, isBasic: this.isBasic,
classificationDefCollection: this.classificationDefCollection, classificationDefCollection: this.classificationDefCollection,
entityDefCollection: this.entityDefCollection, entityDefCollection: this.entityDefCollection,
fetchFavioriteCollection: this.fetchCollection.bind(this) fetchFavioriteCollection: this.fetchCollection.bind(this),
searchTypeObj: this.searchTypeObj
}; };
}, },
childEvents: function() { childEvents: function() {
...@@ -63,11 +64,20 @@ define(['require', ...@@ -63,11 +64,20 @@ define(['require',
initialize: function(options) { initialize: function(options) {
var that = this; var that = this;
_.extend(this, _.pick(options, 'collection', 'value', 'searchVent', 'typeHeaders', 'applyValue', 'getValue', 'isBasic', 'fetchCollection', 'classificationDefCollection', 'entityDefCollection')); _.extend(this, _.pick(options, 'collection', 'value', 'searchVent', 'typeHeaders', 'applyValue', 'getValue', 'isBasic', 'fetchCollection', 'classificationDefCollection', 'entityDefCollection'));
this.searchTypeObj = {
'searchType': 'dsl',
'dslChecked': 'true'
}
if (this.isBasic) {
this.searchTypeObj.dslChecked = false;
this.searchTypeObj.searchType = 'basic';
}
}, },
onRender: function() { onRender: function() {
this.bindEvents(); this.bindEvents();
}, },
bindEvents: function() { bindEvents: function() {
var that = this;
this.listenTo(this.collection, "add reset error", function(model, collection) { this.listenTo(this.collection, "add reset error", function(model, collection) {
this.$('.fontLoader-relative').hide(); this.$('.fontLoader-relative').hide();
if (this.collection && this.collection.length) { if (this.collection && this.collection.length) {
...@@ -76,6 +86,13 @@ define(['require', ...@@ -76,6 +86,13 @@ define(['require',
this.$(".noFavoriteSearch").show(); this.$(".noFavoriteSearch").show();
} }
}, this); }, this);
$('body').on('click', '.saveSearchPopoverList_' + (this.isBasic ? 'isBasic' : 'isAdvance') + ' li', function(e) {
that.$('.saveSearchPopover').popover('hide');
var id = $(this).parent('ul').data('id');
that[$(this).find('a').data('fn')]({
'model': that.collection.find({ 'guid': id })
});
});
}, },
saveAs: function(e) { saveAs: function(e) {
var value = this.getValue(); var value = this.getValue();
...@@ -125,6 +142,63 @@ define(['require', ...@@ -125,6 +142,63 @@ define(['require',
], function(SaveModalLayoutView) { ], function(SaveModalLayoutView) {
new SaveModalLayoutView(options); new SaveModalLayoutView(options);
}); });
},
onSearch: function(options) {
if (options && options.model) {
var searchParameters = options.model.toJSON().searchParameters,
params = CommonViewFunction.generateUrlFromSaveSearchObject({
value: searchParameters,
classificationDefCollection: this.classificationDefCollection,
entityDefCollection: this.entityDefCollection
});
Utils.setUrl({
url: '#!/search/searchResult',
urlParams: _.extend({}, this.searchTypeObj, params),
mergeBrowserUrl: false,
trigger: true,
updateTabState: true
});
}
},
onRename: function(options) {
if (options && options.model) {
var that = this;
require([
'views/search/save/SaveModalLayoutView'
], function(SaveModalLayoutView) {
new SaveModalLayoutView({ 'selectedModel': options.model, 'collection': that.collection, 'getValue': that.getValue, 'isBasic': that.isBasic });
});
}
},
onDelete: function(options) {
if (options && options.model) {
var that = this;
var notifyObj = {
modal: true,
html: true,
text: Messages.conformation.deleteMessage + "<b>" + options.model.get('name') + "</b>" + " ?",
ok: function(argument) {
that.onDeleteNotifyOk(options);
},
cancel: function(argument) {}
}
Utils.notifyConfirm(notifyObj);
}
},
onDeleteNotifyOk: function(options) {
var that = this;
options.model.urlRoot = UrlLinks.saveSearchApiUrl();
options.model.destroy({
wait: true,
success: function(model, data) {
if (that.collection) {
that.collection.remove(data);
}
Utils.notifySuccess({
content: options.model.get('name') + Messages.deleteSuccessMessage
});
}
});
} }
}); });
}); });
\ No newline at end of file
...@@ -69,6 +69,10 @@ define(['require', ...@@ -69,6 +69,10 @@ define(['require',
this.ui.tagsParent.on('click', 'li.parent-node a', function() { this.ui.tagsParent.on('click', 'li.parent-node a', function() {
that.setUrl(this.getAttribute("href")); that.setUrl(this.getAttribute("href"));
}); });
$('body').on('click', '.tagPopoverOptions li', function(e) {
that.$('.tagPopover').popover('hide');
that[$(this).find('a').data('fn')](e)
});
}, },
onRender: function() { onRender: function() {
var that = this; var that = this;
...@@ -330,7 +334,7 @@ define(['require', ...@@ -330,7 +334,7 @@ define(['require',
var that = this; var that = this;
Utils.generatePopover({ Utils.generatePopover({
el: this.$('.tagPopover'), el: this.$('.tagPopover'),
container: this.$el, contentClass: 'tagPopoverOptions',
popoverOptions: { popoverOptions: {
content: function() { content: function() {
return "<ul>" + return "<ul>" +
...@@ -339,10 +343,6 @@ define(['require', ...@@ -339,10 +343,6 @@ define(['require',
"</ul>"; "</ul>";
} }
} }
}).parent('.tools').on('click', 'li', function(e) {
e.stopPropagation();
that.$('.tagPopover').popover('hide');
that[$(this).find('a').data('fn')](e)
}); });
}, },
onSearchTag: function() { onSearchTag: function() {
......
...@@ -318,6 +318,8 @@ define(['require', ...@@ -318,6 +318,8 @@ define(['require',
'<option value="">--Select true or false--</option>' + '<option value="">--Select true or false--</option>' +
'<option value="true">true</option>' + '<option value="true">true</option>' +
'<option value="false">false</option></select>'; '<option value="false">false</option></select>';
} else if (typeName === "int") {
return '<input type="' + type + '" value="' + value + '" class="form-control attributeInputVal attrName number-input" data-key="' + labelName + '" data-type="' + typeName + '"></input></div>';
} else { } else {
return '<input type="' + type + '" value="' + value + '" class="form-control attributeInputVal attrName" data-key="' + labelName + '" data-type="' + typeName + '"></input></div>'; return '<input type="' + type + '" value="' + value + '" class="form-control attributeInputVal attrName" data-key="' + labelName + '" data-type="' + typeName + '"></input></div>';
} }
...@@ -375,4 +377,4 @@ define(['require', ...@@ -375,4 +377,4 @@ define(['require',
}, },
}); });
return AddTagModel; return AddTagModel;
}); });
\ No newline at end of file
...@@ -44,6 +44,7 @@ Redirect(); ...@@ -44,6 +44,7 @@ Redirect();
<link href="js/libs/font-awesome/css/font-awesome.min.css" rel="stylesheet"> <link href="js/libs/font-awesome/css/font-awesome.min.css" rel="stylesheet">
<link href="css/login.css" media="all" rel="stylesheet" type="text/css" > <link href="css/login.css" media="all" rel="stylesheet" type="text/css" >
<script src="js/libs/jquery/js/jquery.min.js" ></script> <script src="js/libs/jquery/js/jquery.min.js" ></script>
<script src="js/libs/jquery-placeholder/js/jquery.placeholder.js"></script>
<script src="js/modules/atlasLogin.js" ></script> <script src="js/modules/atlasLogin.js" ></script>
</head> </head>
<body class="login" style=""> <body class="login" style="">
......
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