Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
atlas
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dataplatform
atlas
Commits
590b38ac
Commit
590b38ac
authored
Dec 22, 2016
by
kalyanikk
Committed by
Madhan Neethiraj
Dec 22, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-1402: UI issues due to v2 API integration
Signed-off-by:
Madhan Neethiraj
<
madhan@apache.org
>
parent
40e639ed
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
126 additions
and
142 deletions
+126
-142
override.scss
dashboardv2/public/css/scss/override.scss
+0
-4
tag.scss
dashboardv2/public/css/scss/tag.scss
+2
-2
index.html
dashboardv2/public/index.html
+1
-0
CommonViewFunction.js
dashboardv2/public/js/utils/CommonViewFunction.js
+18
-17
Utils.js
dashboardv2/public/js/utils/Utils.js
+7
-7
AuditTableLayoutView.js
dashboardv2/public/js/views/audit/AuditTableLayoutView.js
+15
-3
CreateAuditTableLayoutView.js
...ardv2/public/js/views/audit/CreateAuditTableLayoutView.js
+2
-2
BusinessCatalogDetailLayoutView.js
...views/business_catalog/BusinessCatalogDetailLayoutView.js
+2
-52
BusinessCatalogHeader.js
...public/js/views/business_catalog/BusinessCatalogHeader.js
+1
-1
TreeLayoutView.js
...oardv2/public/js/views/business_catalog/TreeLayoutView.js
+4
-4
DetailPageLayoutView.js
...ardv2/public/js/views/detail_page/DetailPageLayoutView.js
+9
-7
CreateEntityLayoutView.js
dashboardv2/public/js/views/entity/CreateEntityLayoutView.js
+7
-5
SchemaLayoutView.js
dashboardv2/public/js/views/schema/SchemaLayoutView.js
+2
-2
SearchLayoutView.js
dashboardv2/public/js/views/search/SearchLayoutView.js
+1
-1
SearchResultLayoutView.js
dashboardv2/public/js/views/search/SearchResultLayoutView.js
+9
-8
CreateTagLayoutView.js
dashboardv2/public/js/views/tag/CreateTagLayoutView.js
+2
-2
TagAttributeDetailLayoutView.js
...ardv2/public/js/views/tag/TagAttributeDetailLayoutView.js
+29
-12
TagDetailTableLayoutView.js
dashboardv2/public/js/views/tag/TagDetailTableLayoutView.js
+3
-3
TagLayoutView.js
dashboardv2/public/js/views/tag/TagLayoutView.js
+5
-4
addTagModalView.js
dashboardv2/public/js/views/tag/addTagModalView.js
+7
-6
No files found.
dashboardv2/public/css/scss/override.scss
View file @
590b38ac
...
@@ -155,10 +155,6 @@
...
@@ -155,10 +155,6 @@
width
:
300px
!
important
;
width
:
300px
!
important
;
}
}
.select2-container--default
.select2-selection--single
.select2-selection__rendered
{
width
:
327px
!
important
;
}
.typeLOV
{
.typeLOV
{
.select2-container--default
{
.select2-container--default
{
.select2-selection--multiple
{
.select2-selection--multiple
{
...
...
dashboardv2/public/css/scss/tag.scss
View file @
590b38ac
...
@@ -365,10 +365,10 @@ legend.scheduler-border {
...
@@ -365,10 +365,10 @@ legend.scheduler-border {
.spanEntityType
{
.spanEntityType
{
position
:
absolute
;
position
:
absolute
;
right
:
38
px
;
right
:
45
px
;
top
:
10px
;
top
:
10px
;
cursor
:
help
;
cursor
:
help
;
width
:
4
5
px
;
width
:
4
0
px
;
overflow
:
hidden
;
overflow
:
hidden
;
z-index
:
9
;
z-index
:
9
;
text-overflow
:
ellipsis
;
text-overflow
:
ellipsis
;
...
...
dashboardv2/public/index.html
View file @
590b38ac
...
@@ -30,6 +30,7 @@
...
@@ -30,6 +30,7 @@
<meta
charset=
"utf-8"
>
<meta
charset=
"utf-8"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge,chrome=1"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge,chrome=1"
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=utf-8; Cache-Control: no-cache"
/>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=utf-8; Cache-Control: no-cache"
/>
<meta
http-equiv=
"X-Frame-Options"
content=
"deny"
>
<title>
Atlas
</title>
<title>
Atlas
</title>
<meta
name=
"description"
content=
""
>
<meta
name=
"description"
content=
""
>
<meta
name=
"viewport"
content=
"width=device-width"
>
<meta
name=
"viewport"
content=
"width=device-width"
>
...
...
dashboardv2/public/js/utils/CommonViewFunction.js
View file @
590b38ac
...
@@ -99,9 +99,9 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
...
@@ -99,9 +99,9 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
}
}
if
(
value
.
length
>
1
)
{
if
(
value
.
length
>
1
)
{
scope
.
$
(
'td div[data-id="'
+
id
+
'"]'
).
html
(
'<a href="#!/detailPage/'
+
id
+
'">'
+
value
+
'</a>'
);
scope
.
$
(
'td div[data-id="'
+
id
+
'"]'
).
html
(
'<a href="#!/detailPage/'
+
id
+
'">'
+
_
.
escape
(
value
)
+
'</a>'
);
}
else
{
}
else
{
scope
.
$
(
'td div[data-id="'
+
id
+
'"]'
).
html
(
'<a href="#!/detailPage/'
+
id
+
'">'
+
id
+
'</a>'
);
scope
.
$
(
'td div[data-id="'
+
id
+
'"]'
).
html
(
'<a href="#!/detailPage/'
+
id
+
'">'
+
_
.
escape
(
id
)
+
'</a>'
);
}
}
if
(
deleteButton
.
length
)
{
if
(
deleteButton
.
length
)
{
scope
.
$
(
'td div[data-id="'
+
id
+
'"]'
).
addClass
(
'block readOnlyLink'
);
scope
.
$
(
'td div[data-id="'
+
id
+
'"]'
).
addClass
(
'block readOnlyLink'
);
...
@@ -118,6 +118,7 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
...
@@ -118,6 +118,7 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
});
});
}
}
_
.
keys
(
valueObject
).
map
(
function
(
key
)
{
_
.
keys
(
valueObject
).
map
(
function
(
key
)
{
key
=
_
.
escape
(
key
)
var
keyValue
=
valueObject
[
key
],
var
keyValue
=
valueObject
[
key
],
valueOfArray
=
[];
valueOfArray
=
[];
if
(
_
.
isArray
(
keyValue
)
||
_
.
isObject
(
keyValue
))
{
if
(
_
.
isArray
(
keyValue
)
||
_
.
isObject
(
keyValue
))
{
...
@@ -132,7 +133,7 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
...
@@ -132,7 +133,7 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
readOnly
=
false
;
readOnly
=
false
;
if
(
_
.
isString
(
inputOutputField
)
||
_
.
isBoolean
(
inputOutputField
)
||
_
.
isNumber
(
inputOutputField
))
{
if
(
_
.
isString
(
inputOutputField
)
||
_
.
isBoolean
(
inputOutputField
)
||
_
.
isNumber
(
inputOutputField
))
{
if
(
inputOutputField
.
indexOf
(
"$"
)
==
-
1
)
{
if
(
inputOutputField
.
indexOf
(
"$"
)
==
-
1
)
{
valueOfArray
.
push
(
'<span>'
+
inputOutputField
+
'</span>'
);
valueOfArray
.
push
(
'<span>'
+
_
.
escape
(
inputOutputField
)
+
'</span>'
);
}
}
}
else
if
(
_
.
isObject
(
inputOutputField
)
&&
!
inputOutputField
.
attributes
&&
!
id
)
{
}
else
if
(
_
.
isObject
(
inputOutputField
)
&&
!
inputOutputField
.
attributes
&&
!
id
)
{
_
.
each
(
inputOutputField
,
function
(
objValue
,
objKey
)
{
_
.
each
(
inputOutputField
,
function
(
objValue
,
objKey
)
{
...
@@ -141,7 +142,7 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
...
@@ -141,7 +142,7 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
if
(
_
.
isObject
(
value
))
{
if
(
_
.
isObject
(
value
))
{
value
=
JSON
.
stringify
(
value
);
value
=
JSON
.
stringify
(
value
);
}
}
valueOfArray
.
push
(
'<span>'
+
objKey
+
':'
+
value
+
'</span>'
);
valueOfArray
.
push
(
'<span>'
+
_
.
escape
(
objKey
)
+
':'
+
_
.
escape
(
value
)
+
'</span>'
);
}
}
});
});
}
}
...
@@ -149,18 +150,18 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
...
@@ -149,18 +150,18 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
if
(
id
&&
inputOutputField
)
{
if
(
id
&&
inputOutputField
)
{
if
(
inputOutputField
.
attributes
)
{
if
(
inputOutputField
.
attributes
)
{
if
(
inputOutputField
.
attributes
.
name
)
{
if
(
inputOutputField
.
attributes
.
name
)
{
tempLink
+=
'<a href="#!/detailPage/'
+
id
+
'">'
+
inputOutputField
.
attributes
.
name
+
'</a>'
tempLink
+=
'<a href="#!/detailPage/'
+
id
+
'">'
+
_
.
escape
(
inputOutputField
.
attributes
.
name
)
+
'</a>'
}
else
if
(
inputOutputField
.
attributes
.
qualifiedName
)
{
}
else
if
(
inputOutputField
.
attributes
.
qualifiedName
)
{
tempLink
+=
'<a href="#!/detailPage/'
+
id
+
'">'
+
inputOutputField
.
attributes
.
qualifiedName
+
'</a>'
tempLink
+=
'<a href="#!/detailPage/'
+
id
+
'">'
+
_
.
escape
(
inputOutputField
.
attributes
.
qualifiedName
)
+
'</a>'
}
else
if
(
inputOutputField
.
typeName
)
{
}
else
if
(
inputOutputField
.
typeName
)
{
tempLink
+=
'<a href="#!/detailPage/'
+
id
+
'">'
+
inputOutputField
.
typeName
+
'</a>'
tempLink
+=
'<a href="#!/detailPage/'
+
id
+
'">'
+
_
.
escape
(
inputOutputField
.
typeName
)
+
'</a>'
}
else
{
}
else
{
tempLink
+=
'<a href="#!/detailPage/'
+
id
+
'">'
+
id
+
'</a>'
tempLink
+=
'<a href="#!/detailPage/'
+
id
+
'">'
+
id
+
'</a>'
}
}
}
else
if
(
inputOutputField
.
name
)
{
}
else
if
(
inputOutputField
.
name
)
{
tempLink
+=
'<a href="#!/detailPage/'
+
id
+
'">'
+
inputOutputField
.
name
+
'</a>'
;
tempLink
+=
'<a href="#!/detailPage/'
+
id
+
'">'
+
_
.
escape
(
inputOutputField
.
name
)
+
'</a>'
;
}
else
if
(
inputOutputField
.
qualifiedName
)
{
}
else
if
(
inputOutputField
.
qualifiedName
)
{
tempLink
+=
'<a href="#!/detailPage/'
+
id
+
'">'
+
inputOutputField
.
qualifiedName
+
'</a>'
tempLink
+=
'<a href="#!/detailPage/'
+
id
+
'">'
+
_
.
escape
(
inputOutputField
.
qualifiedName
)
+
'</a>'
}
else
{
}
else
{
var
fetch
=
true
;
var
fetch
=
true
;
fetchInputOutputValue
(
id
);
fetchInputOutputValue
(
id
);
...
@@ -191,7 +192,7 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
...
@@ -191,7 +192,7 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
if
(
searchTable
)
{
if
(
searchTable
)
{
table
=
subLink
;
table
=
subLink
;
}
else
{
}
else
{
table
+=
'<tr><td>'
+
key
+
'</td><td>'
+
subLink
+
'</td></tr>'
;
table
+=
'<tr><td>'
+
key
+
'</td><td>'
+
_
.
escape
(
subLink
)
+
'</td></tr>'
;
}
}
}
else
{
}
else
{
if
(
key
.
indexOf
(
"Time"
)
!==
-
1
||
key
==
"retention"
)
{
if
(
key
.
indexOf
(
"Time"
)
!==
-
1
||
key
==
"retention"
)
{
...
@@ -208,7 +209,7 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
...
@@ -208,7 +209,7 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
table
=
valueObject
[
key
];
table
=
valueObject
[
key
];
}
}
}
else
{
}
else
{
table
+=
'<tr><td>'
+
key
+
'</td><td>'
+
valueObject
[
key
]
+
'</td></tr>'
;
table
+=
'<tr><td>'
+
key
+
'</td><td>'
+
_
.
escape
(
valueObject
[
key
])
+
'</td></tr>'
;
}
}
}
}
}
}
...
@@ -236,13 +237,13 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
...
@@ -236,13 +237,13 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
if
(
i
==
0
)
{
if
(
i
==
0
)
{
href
=
splitUrlWithoutTerm
[
i
];
href
=
splitUrlWithoutTerm
[
i
];
urlList
.
push
({
urlList
.
push
({
value
:
splitUrlWithoutTerm
[
i
]
,
value
:
_
.
escape
(
splitUrlWithoutTerm
[
i
])
,
href
:
href
href
:
href
});
});
}
else
{
}
else
{
href
+=
"/terms/"
+
splitUrlWithoutTerm
[
i
];
href
+=
"/terms/"
+
splitUrlWithoutTerm
[
i
];
urlList
.
push
({
urlList
.
push
({
value
:
splitUrlWithoutTerm
[
i
]
,
value
:
_
.
escape
(
splitUrlWithoutTerm
[
i
])
,
href
:
href
href
:
href
});
});
};
};
...
@@ -254,7 +255,7 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
...
@@ -254,7 +255,7 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
var
li
=
""
;
var
li
=
""
;
if
(
options
.
urlList
)
{
if
(
options
.
urlList
)
{
_
.
each
(
options
.
urlList
,
function
(
object
)
{
_
.
each
(
options
.
urlList
,
function
(
object
)
{
li
+=
'<li><a class="link" href="#!/taxonomy/detailCatalog/api/atlas/v1/taxonomies/'
+
object
.
href
+
'?load=true">'
+
object
.
value
+
'</a></li>'
;
li
+=
'<li><a class="link" href="#!/taxonomy/detailCatalog/api/atlas/v1/taxonomies/'
+
object
.
href
+
'?load=true">'
+
_
.
escape
(
object
.
value
)
+
'</a></li>'
;
});
});
}
}
if
(
options
.
scope
)
{
if
(
options
.
scope
)
{
...
@@ -300,8 +301,8 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
...
@@ -300,8 +301,8 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
}
}
if
(
tagName
.
term
)
{
if
(
tagName
.
term
)
{
terms
.
push
({
terms
.
push
({
deleteHtml
:
'<a class="pull-left" title="Remove Term"><i class="fa fa-trash" data-id="tagClick" data-type="term" data-assetname="'
+
model
.
get
(
"name"
)
+
'" data-name="'
+
tagName
.
fullName
+
'" data-guid="'
+
(
model
.
get
(
'$id$'
).
id
||
model
.
get
(
'$id$'
))
+
'" ></i></a>'
,
deleteHtml
:
'<a class="pull-left" title="Remove Term"><i class="fa fa-trash" data-id="tagClick" data-type="term" data-assetname="'
+
_
.
escape
(
model
.
get
(
"name"
)
)
+
'" data-name="'
+
tagName
.
fullName
+
'" data-guid="'
+
(
model
.
get
(
'$id$'
).
id
||
model
.
get
(
'$id$'
))
+
'" ></i></a>'
,
url
:
tagName
.
fullName
.
split
(
"."
).
join
(
"/"
),
url
:
_
.
unescape
(
tagName
.
fullName
)
.
split
(
"."
).
join
(
"/"
),
name
:
tagName
.
fullName
name
:
tagName
.
fullName
});
});
}
}
...
@@ -312,7 +313,7 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
...
@@ -312,7 +313,7 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
className
+=
"showHideDiv hide"
;
className
+=
"showHideDiv hide"
;
}
}
obj
[
'valueUrl'
]
=
CommonViewFunction
.
breadcrumbUrlMaker
(
obj
.
url
);
obj
[
'valueUrl'
]
=
CommonViewFunction
.
breadcrumbUrlMaker
(
obj
.
url
);
html
+=
'<div class="'
+
className
+
'" dataterm-name="'
+
obj
.
name
+
'"><div class="liContent"></div>'
+
obj
.
deleteHtml
+
'</div>'
;
html
+=
'<div class="'
+
className
+
'" dataterm-name="'
+
_
.
escape
(
obj
.
name
)
+
'"><div class="liContent"></div>'
+
obj
.
deleteHtml
+
'</div>'
;
})
})
if
(
terms
.
length
>
1
)
{
if
(
terms
.
length
>
1
)
{
html
+=
'<div><a href="javascript:void(0)" data-id="showMoreLessTerm" class="inputTag inputTagGreen"><span>Show More </span><i class="fa fa-angle-right"></i></a></div>'
html
+=
'<div><a href="javascript:void(0)" data-id="showMoreLessTerm" class="inputTag inputTagGreen"><span>Show More </span><i class="fa fa-angle-right"></i></a></div>'
...
...
dashboardv2/public/js/utils/Utils.js
View file @
590b38ac
...
@@ -49,33 +49,33 @@ define(['require', 'utils/Globals', 'pnotify'], function(require, Globals, pnoti
...
@@ -49,33 +49,33 @@ define(['require', 'utils/Globals', 'pnotify'], function(require, Globals, pnoti
};
};
var
notify
=
function
(
options
)
{
var
notify
=
function
(
options
)
{
new
pnotify
(
_
.
extend
({
icon
:
true
,
hide
:
true
,
delay
:
3000
,
remove
:
true
},
options
));
new
pnotify
(
_
.
extend
({
icon
:
true
,
hide
:
true
,
delay
:
3000
,
remove
:
true
},
options
));
}
}
Utils
.
notifyInfo
=
function
(
options
)
{
Utils
.
notifyInfo
=
function
(
options
)
{
notify
({
notify
({
type
:
"info"
,
type
:
"info"
,
text
:
options
.
content
||
"Info message."
text
:
_
.
escape
(
options
.
content
)
||
"Info message."
});
});
};
};
Utils
.
notifyWarn
=
function
(
options
)
{
Utils
.
notifyWarn
=
function
(
options
)
{
notify
({
notify
({
type
:
"notice"
,
type
:
"notice"
,
text
:
options
.
content
||
"Info message."
text
:
_
.
escape
(
options
.
content
)
||
"Info message."
});
});
};
};
Utils
.
notifyError
=
function
(
options
)
{
Utils
.
notifyError
=
function
(
options
)
{
notify
({
notify
({
type
:
"error"
,
type
:
"error"
,
text
:
options
.
content
||
"Error occurred."
text
:
_
.
escape
(
options
.
content
)
||
"Error occurred."
});
});
};
};
Utils
.
notifySuccess
=
function
(
options
)
{
Utils
.
notifySuccess
=
function
(
options
)
{
notify
({
notify
({
type
:
"success"
,
type
:
"success"
,
text
:
options
.
content
||
"Error occurred."
text
:
_
.
escape
(
options
.
content
)
||
"Error occurred."
});
});
};
};
Utils
.
defaultErrorHandler
=
function
(
model
,
error
)
{
Utils
.
defaultErrorHandler
=
function
(
model
,
error
)
{
...
@@ -243,7 +243,7 @@ define(['require', 'utils/Globals', 'pnotify'], function(require, Globals, pnoti
...
@@ -243,7 +243,7 @@ define(['require', 'utils/Globals', 'pnotify'], function(require, Globals, pnoti
if
(
value
==
"TaxonomyTerm"
)
{
if
(
value
==
"TaxonomyTerm"
)
{
return
{}
return
{}
}
}
var
name
=
value
.
split
(
'.'
);
var
name
=
_
.
escape
(
value
)
.
split
(
'.'
);
return
{
return
{
term
:
true
,
term
:
true
,
tag
:
false
,
tag
:
false
,
...
@@ -261,7 +261,7 @@ define(['require', 'utils/Globals', 'pnotify'], function(require, Globals, pnoti
...
@@ -261,7 +261,7 @@ define(['require', 'utils/Globals', 'pnotify'], function(require, Globals, pnoti
if
(
name
===
"TaxonomyTerm"
)
{
if
(
name
===
"TaxonomyTerm"
)
{
return
{}
return
{}
}
}
name
=
name
.
split
(
'.'
);
name
=
_
.
escape
(
name
)
.
split
(
'.'
);
var
trem
=
false
;
var
trem
=
false
;
if
(
value
[
'taxonomy.namespace'
])
{
if
(
value
[
'taxonomy.namespace'
])
{
trem
=
true
;
trem
=
true
;
...
...
dashboardv2/public/js/views/audit/AuditTableLayoutView.js
View file @
590b38ac
...
@@ -58,7 +58,7 @@ define(['require',
...
@@ -58,7 +58,7 @@ define(['require',
* @constructs
* @constructs
*/
*/
initialize
:
function
(
options
)
{
initialize
:
function
(
options
)
{
_
.
extend
(
this
,
_
.
pick
(
options
,
'globalVent'
,
'guid'
));
_
.
extend
(
this
,
_
.
pick
(
options
,
'globalVent'
,
'guid'
,
'vent'
));
this
.
entityCollection
=
new
VEntityList
();
this
.
entityCollection
=
new
VEntityList
();
this
.
count
=
26
;
this
.
count
=
26
;
this
.
entityCollection
.
url
=
UrlLinks
.
entityCollectionaudit
(
this
.
guid
);
this
.
entityCollection
.
url
=
UrlLinks
.
entityCollectionaudit
(
this
.
guid
);
...
@@ -79,6 +79,7 @@ define(['require',
...
@@ -79,6 +79,7 @@ define(['require',
paginatorOpts
:
{}
paginatorOpts
:
{}
};
};
this
.
currPage
=
1
;
this
.
currPage
=
1
;
this
.
bindEvents
();
// this.pageFrom = 1;
// this.pageFrom = 1;
// this.pageTo = this.count;
// this.pageTo = this.count;
},
},
...
@@ -91,6 +92,17 @@ define(['require',
...
@@ -91,6 +92,17 @@ define(['require',
});
});
this
.
renderTableLayoutView
();
this
.
renderTableLayoutView
();
},
},
bindEvents
:
function
()
{
var
that
=
this
;
this
.
listenTo
(
this
.
vent
,
"reset:collection"
,
function
()
{
this
.
fetchCollection
({
next
:
this
.
ui
.
nextAuditData
,
nextClick
:
false
,
previous
:
this
.
ui
.
previousAuditData
});
},
this
);
},
getToOffset
:
function
()
{
getToOffset
:
function
()
{
var
toOffset
=
0
;
var
toOffset
=
0
;
if
(
this
.
entityCollection
.
models
.
length
<
this
.
count
)
{
if
(
this
.
entityCollection
.
models
.
length
<
this
.
count
)
{
...
@@ -141,7 +153,6 @@ define(['require',
...
@@ -141,7 +153,6 @@ define(['require',
if
((
that
.
entityCollection
.
models
.
length
<
that
.
count
&&
that
.
currPage
==
1
)
&&
that
.
next
==
that
.
entityCollection
.
last
().
get
(
'eventKey'
))
{
if
((
that
.
entityCollection
.
models
.
length
<
that
.
count
&&
that
.
currPage
==
1
)
&&
that
.
next
==
that
.
entityCollection
.
last
().
get
(
'eventKey'
))
{
options
.
next
.
attr
(
'disabled'
,
true
);
options
.
next
.
attr
(
'disabled'
,
true
);
options
.
previous
.
removeAttr
(
"disabled"
);
options
.
previous
.
removeAttr
(
"disabled"
);
//that.renderTableLayoutView();
}
else
{
}
else
{
if
(
that
.
entityCollection
.
models
.
length
>
0
)
{
if
(
that
.
entityCollection
.
models
.
length
>
0
)
{
that
.
next
=
that
.
entityCollection
.
last
().
get
(
'eventKey'
);
that
.
next
=
that
.
entityCollection
.
last
().
get
(
'eventKey'
);
...
@@ -149,8 +160,9 @@ define(['require',
...
@@ -149,8 +160,9 @@ define(['require',
options
.
previous
.
attr
(
'disabled'
,
true
);
options
.
previous
.
attr
(
'disabled'
,
true
);
}
}
}
}
that
.
renderTableLayoutView
();
}
}
that
.
renderTableLayoutView
();
},
},
silent
:
true
silent
:
true
});
});
...
...
dashboardv2/public/js/views/audit/CreateAuditTableLayoutView.js
View file @
590b38ac
...
@@ -70,7 +70,7 @@ define(['require',
...
@@ -70,7 +70,7 @@ define(['require',
var
valueObject
=
detailsObject
.
values
;
var
valueObject
=
detailsObject
.
values
;
if
(
this
.
action
==
Enums
.
auditAction
.
TAG_ADD
)
{
if
(
this
.
action
==
Enums
.
auditAction
.
TAG_ADD
)
{
this
.
ui
.
auditHeaderValue
.
html
(
'<th>Tag</th>'
);
this
.
ui
.
auditHeaderValue
.
html
(
'<th>Tag</th>'
);
this
.
ui
.
auditValue
.
html
(
"<tr><td>"
+
detailsObject
.
typeName
+
"</td></tr>"
);
this
.
ui
.
auditValue
.
html
(
"<tr><td>"
+
_
.
escape
(
detailsObject
.
typeName
)
+
"</td></tr>"
);
}
else
{
}
else
{
this
.
ui
.
auditHeaderValue
.
html
(
'<th>Key</th><th>New Value</th>'
);
this
.
ui
.
auditHeaderValue
.
html
(
'<th>Key</th><th>New Value</th>'
);
table
=
CommonViewFunction
.
propertyTable
(
valueObject
,
this
);
table
=
CommonViewFunction
.
propertyTable
(
valueObject
,
this
);
...
@@ -86,7 +86,7 @@ define(['require',
...
@@ -86,7 +86,7 @@ define(['require',
}
else
if
(
this
.
action
==
Enums
.
auditAction
.
TAG_DELETE
)
{
}
else
if
(
this
.
action
==
Enums
.
auditAction
.
TAG_DELETE
)
{
var
appendedString
=
this
.
entityModel
.
get
(
'details'
).
split
(
':'
);
var
appendedString
=
this
.
entityModel
.
get
(
'details'
).
split
(
':'
);
this
.
ui
.
auditHeaderValue
.
html
(
'<th>Tag</th>'
);
this
.
ui
.
auditHeaderValue
.
html
(
'<th>Tag</th>'
);
this
.
ui
.
auditValue
.
html
(
"<tr><td>"
+
appendedString
[
1
]
+
"</td></tr>"
);
this
.
ui
.
auditValue
.
html
(
"<tr><td>"
+
_
.
escape
(
appendedString
[
1
])
+
"</td></tr>"
);
}
}
},
},
...
...
dashboardv2/public/js/views/business_catalog/BusinessCatalogDetailLayoutView.js
View file @
590b38ac
...
@@ -104,7 +104,7 @@ define(['require',
...
@@ -104,7 +104,7 @@ define(['require',
}
}
if
(
description
)
{
if
(
description
)
{
this
.
ui
.
description
.
show
();
this
.
ui
.
description
.
show
();
this
.
ui
.
description
.
html
(
'<span>'
+
description
+
'</span>'
);
this
.
ui
.
description
.
html
(
'<span>'
+
_
.
escape
(
description
)
+
'</span>'
);
}
else
{
}
else
{
this
.
ui
.
description
.
hide
();
this
.
ui
.
description
.
hide
();
}
}
...
@@ -129,56 +129,6 @@ define(['require',
...
@@ -129,56 +129,6 @@ define(['require',
this
.
ui
.
editButton
.
show
();
this
.
ui
.
editButton
.
show
();
this
.
ui
.
editBox
.
hide
();
this
.
ui
.
editBox
.
hide
();
},
},
addTagCollectionList
:
function
(
obj
,
searchString
)
{
var
list
=
""
,
that
=
this
;
_
.
each
(
obj
,
function
(
model
)
{
var
tags
=
model
.
get
(
"tags"
);
if
(
!
_
.
contains
(
that
.
tagElement
,
tags
))
{
if
(
searchString
)
{
if
(
tags
.
search
(
new
RegExp
(
searchString
,
"i"
))
!=
-
1
)
{
list
+=
'<div><span>'
+
tags
+
'</span></div>'
;
return
;
}
}
else
{
list
+=
'<div><span>'
+
tags
+
'</span></div>'
;
}
}
});
if
(
list
.
length
<=
0
)
{
list
+=
'<div><span>'
+
"No more tags"
+
'</span></div>'
;
}
this
.
ui
.
appendList
.
html
(
list
);
},
addTagToTerms
:
function
(
tagObject
)
{
var
tagData
=
""
;
_
.
each
(
tagObject
,
function
(
val
)
{
tagData
+=
'<span class="inputTag"><span class="inputValue">'
+
val
+
'</span><i class="fa fa-close" data-id="deleteTag"></i></span>'
;
});
this
.
$
(
'.addTag-dropdown'
).
before
(
tagData
);
},
saveTagFromList
:
function
(
ref
)
{
var
that
=
this
;
this
.
entityModel
=
new
VEntity
();
var
tagName
=
ref
.
text
();
var
json
=
{
"jsonClass"
:
"org.apache.atlas.typesystem.json.InstanceSerialization$_Struct"
,
"typeName"
:
tagName
,
"values"
:
{}
};
this
.
entityModel
.
saveEntity
(
this
.
id
,
{
data
:
JSON
.
stringify
(
json
),
success
:
function
(
data
)
{
that
.
collection
.
fetch
({
reset
:
true
});
},
error
:
function
(
error
,
data
,
status
)
{
if
(
error
&&
error
.
responseText
)
{
var
data
=
JSON
.
parse
(
error
.
responseText
);
}
},
complete
:
function
()
{}
});
},
onEditButton
:
function
(
e
)
{
onEditButton
:
function
(
e
)
{
var
that
=
this
;
var
that
=
this
;
$
(
e
.
currentTarget
).
blur
();
$
(
e
.
currentTarget
).
blur
();
...
@@ -186,7 +136,7 @@ define(['require',
...
@@ -186,7 +136,7 @@ define(['require',
'views/tag/CreateTagLayoutView'
,
'views/tag/CreateTagLayoutView'
,
'modules/Modal'
'modules/Modal'
],
function
(
CreateTagLayoutView
,
Modal
)
{
],
function
(
CreateTagLayoutView
,
Modal
)
{
var
view
=
new
CreateTagLayoutView
({
'termCollection'
:
that
.
collection
,
'descriptionData'
:
that
.
model
.
get
(
'description'
),
'tag'
:
that
.
termName
.
name
});
var
view
=
new
CreateTagLayoutView
({
'termCollection'
:
that
.
collection
,
'descriptionData'
:
that
.
model
.
get
(
'description'
),
'tag'
:
_
.
unescape
(
that
.
termName
.
name
)
});
var
modal
=
new
Modal
({
var
modal
=
new
Modal
({
title
:
'Edit Term'
,
title
:
'Edit Term'
,
content
:
view
,
content
:
view
,
...
...
dashboardv2/public/js/views/business_catalog/BusinessCatalogHeader.js
View file @
590b38ac
...
@@ -41,7 +41,7 @@ define(['require',
...
@@ -41,7 +41,7 @@ define(['require',
var
that
=
this
;
var
that
=
this
;
$
(
this
.
el
).
html
(
this
.
template
());
$
(
this
.
el
).
html
(
this
.
template
());
if
(
Globals
.
userLogedIn
.
status
)
{
if
(
Globals
.
userLogedIn
.
status
)
{
that
.
$
(
'.userName'
).
html
(
Globals
.
userLogedIn
.
response
.
userName
);
that
.
$
(
'.userName'
).
text
(
Globals
.
userLogedIn
.
response
.
userName
);
}
}
var
that
=
this
;
var
that
=
this
;
if
(
this
.
url
)
{
if
(
this
.
url
)
{
...
...
dashboardv2/public/js/views/business_catalog/TreeLayoutView.js
View file @
590b38ac
...
@@ -259,11 +259,11 @@ define(['require',
...
@@ -259,11 +259,11 @@ define(['require',
if
(
isParent
)
{
if
(
isParent
)
{
this
.
parentCollection
.
url
=
this
.
url
;
this
.
parentCollection
.
url
=
this
.
url
;
this
.
parentCollection
.
fullCollection
.
reset
(
undefined
,
{
silent
:
true
});
this
.
parentCollection
.
fullCollection
.
reset
(
undefined
,
{
silent
:
true
});
this
.
parentCollection
.
fetch
({
reset
:
true
,
cache
:
true
});
this
.
parentCollection
.
fetch
({
reset
:
true
,
cache
:
true
});
}
else
{
}
else
{
this
.
childCollection
.
url
=
this
.
url
+
"?hierarchy/path:."
;
this
.
childCollection
.
url
=
this
.
url
+
"?hierarchy/path:."
;
this
.
childCollection
.
fullCollection
.
reset
(
undefined
,
{
silent
:
true
});
this
.
childCollection
.
fullCollection
.
reset
(
undefined
,
{
silent
:
true
});
this
.
childCollection
.
fetch
({
reset
:
true
});
this
.
childCollection
.
fetch
({
reset
:
true
,
cache
:
true
});
}
}
},
},
showLoader
:
function
()
{
showLoader
:
function
()
{
...
@@ -530,7 +530,7 @@ define(['require',
...
@@ -530,7 +530,7 @@ define(['require',
assetName
=
$
(
e
.
target
).
data
(
"assetname"
),
assetName
=
$
(
e
.
target
).
data
(
"assetname"
),
that
=
this
,
that
=
this
,
modal
=
CommonViewFunction
.
deleteTagModel
({
modal
=
CommonViewFunction
.
deleteTagModel
({
msg
:
"<div class='ellipsis'>Delete: "
+
"<b>"
+
termName
+
"?</b></div>"
+
msg
:
"<div class='ellipsis'>Delete: "
+
"<b>"
+
_
.
escape
(
termName
)
+
"?</b></div>"
+
"<p class='termNote'>Assets mapped to this term will be unclassified.</p>"
,
"<p class='termNote'>Assets mapped to this term will be unclassified.</p>"
,
titleMessage
:
Messages
.
deleteTerm
,
titleMessage
:
Messages
.
deleteTerm
,
buttonText
:
"Delete"
buttonText
:
"Delete"
...
@@ -616,7 +616,7 @@ define(['require',
...
@@ -616,7 +616,7 @@ define(['require',
var
view
=
new
AddTermLayoutView
({
var
view
=
new
AddTermLayoutView
({
url
:
UrlLinks
.
taxonomiesApiUrl
(),
url
:
UrlLinks
.
taxonomiesApiUrl
(),
model
:
new
that
.
parentCollection
.
model
(),
model
:
new
that
.
parentCollection
.
model
(),
defaultTerm
:
true
defaultTerm
:
true
});
});
var
modal
=
new
Modal
({
var
modal
=
new
Modal
({
title
:
'Taxonomy'
,
title
:
'Taxonomy'
,
...
...
dashboardv2/public/js/views/detail_page/DetailPageLayoutView.js
View file @
590b38ac
...
@@ -113,6 +113,7 @@ define(['require',
...
@@ -113,6 +113,7 @@ define(['require',
initialize
:
function
(
options
)
{
initialize
:
function
(
options
)
{
_
.
extend
(
this
,
_
.
pick
(
options
,
'globalVent'
,
'collection'
,
'vent'
,
'id'
));
_
.
extend
(
this
,
_
.
pick
(
options
,
'globalVent'
,
'collection'
,
'vent'
,
'id'
));
this
.
bindEvents
();
this
.
bindEvents
();
this
.
auditVent
=
new
Backbone
.
Wreqr
.
EventAggregator
();
},
},
bindEvents
:
function
()
{
bindEvents
:
function
()
{
var
that
=
this
;
var
that
=
this
;
...
@@ -151,7 +152,7 @@ define(['require',
...
@@ -151,7 +152,7 @@ define(['require',
this
.
description
=
collectionJSON
.
attributes
.
description
;
this
.
description
=
collectionJSON
.
attributes
.
description
;
if
(
this
.
name
)
{
if
(
this
.
name
)
{
this
.
ui
.
title
.
show
();
this
.
ui
.
title
.
show
();
var
titleName
=
'<span>'
+
this
.
name
+
'</span>'
;
var
titleName
=
'<span>'
+
_
.
escape
(
this
.
name
)
+
'</span>'
;
if
(
this
.
readOnly
)
{
if
(
this
.
readOnly
)
{
titleName
+=
'<button title="Deleted" class="btn btn-atlasAction btn-atlas deleteBtn"><i class="fa fa-trash"></i> Deleted</button>'
;
titleName
+=
'<button title="Deleted" class="btn btn-atlasAction btn-atlas deleteBtn"><i class="fa fa-trash"></i> Deleted</button>'
;
}
}
...
@@ -161,18 +162,18 @@ define(['require',
...
@@ -161,18 +162,18 @@ define(['require',
}
}
if
(
this
.
description
)
{
if
(
this
.
description
)
{
this
.
ui
.
description
.
show
();
this
.
ui
.
description
.
show
();
this
.
ui
.
description
.
html
(
'<span>'
+
this
.
description
+
'</span>'
);
this
.
ui
.
description
.
html
(
'<span>'
+
_
.
escape
(
this
.
description
)
+
'</span>'
);
}
else
{
}
else
{
this
.
ui
.
description
.
hide
();
this
.
ui
.
description
.
hide
();
}
}
}
}
if
(
collectionJSON
.
classifications
)
{
if
(
collectionJSON
.
classifications
)
{
this
.
addTagToTerms
(
collectionJSON
.
classifications
);
this
.
addTagToTerms
(
collectionJSON
.
classifications
);
}
else
{
}
else
{
this
.
addTagToTerms
([]);
this
.
addTagToTerms
([]);
}
}
}
}
this
.
auditVent
.
trigger
(
"reset:collection"
);
this
.
renderEntityDetailTableLayoutView
();
this
.
renderEntityDetailTableLayoutView
();
this
.
renderTagTableLayoutView
(
tagGuid
);
this
.
renderTagTableLayoutView
(
tagGuid
);
this
.
renderTermTableLayoutView
(
tagGuid
);
this
.
renderTermTableLayoutView
(
tagGuid
);
...
@@ -199,13 +200,13 @@ define(['require',
...
@@ -199,13 +200,13 @@ define(['require',
that
=
this
;
that
=
this
;
if
(
tagOrTerm
===
"term"
)
{
if
(
tagOrTerm
===
"term"
)
{
var
modal
=
CommonViewFunction
.
deleteTagModel
({
var
modal
=
CommonViewFunction
.
deleteTagModel
({
msg
:
"<div class='ellipsis'>Remove: "
+
"<b>"
+
tagName
+
"</b> assignment from"
+
" "
+
"<b>"
+
this
.
name
+
"?</b></div>"
,
msg
:
"<div class='ellipsis'>Remove: "
+
"<b>"
+
_
.
escape
(
tagName
)
+
"</b> assignment from"
+
" "
+
"<b>"
+
this
.
name
+
"?</b></div>"
,
titleMessage
:
Messages
.
removeTerm
,
titleMessage
:
Messages
.
removeTerm
,
buttonText
:
"Remove"
buttonText
:
"Remove"
});
});
}
else
if
(
tagOrTerm
===
"tag"
)
{
}
else
if
(
tagOrTerm
===
"tag"
)
{
var
modal
=
CommonViewFunction
.
deleteTagModel
({
var
modal
=
CommonViewFunction
.
deleteTagModel
({
msg
:
"<div class='ellipsis'>Remove: "
+
"<b>"
+
tagName
+
"</b> assignment from"
+
" "
+
"<b>"
+
this
.
name
+
"?</b></div>"
,
msg
:
"<div class='ellipsis'>Remove: "
+
"<b>"
+
_
.
escape
(
tagName
)
+
"</b> assignment from"
+
" "
+
"<b>"
+
this
.
name
+
"?</b></div>"
,
titleMessage
:
Messages
.
removeTag
,
titleMessage
:
Messages
.
removeTag
,
buttonText
:
"Remove"
buttonText
:
"Remove"
});
});
...
@@ -344,7 +345,8 @@ define(['require',
...
@@ -344,7 +345,8 @@ define(['require',
require
([
'views/audit/AuditTableLayoutView'
],
function
(
AuditTableLayoutView
)
{
require
([
'views/audit/AuditTableLayoutView'
],
function
(
AuditTableLayoutView
)
{
that
.
RAuditTableLayoutView
.
show
(
new
AuditTableLayoutView
({
that
.
RAuditTableLayoutView
.
show
(
new
AuditTableLayoutView
({
globalVent
:
that
.
globalVent
,
globalVent
:
that
.
globalVent
,
guid
:
tagGuid
guid
:
tagGuid
,
vent
:
that
.
auditVent
}));
}));
});
});
},
},
...
...
dashboardv2/public/js/views/entity/CreateEntityLayoutView.js
View file @
590b38ac
...
@@ -115,7 +115,7 @@ define(['require',
...
@@ -115,7 +115,7 @@ define(['require',
}
}
}
}
}).
open
();
}).
open
();
var
enable
=
false
;
this
.
modal
.
$el
.
find
(
'button.ok'
).
attr
(
"disabled"
,
true
)
;
this
.
ui
.
entityList
.
val
(
""
);
this
.
ui
.
entityList
.
val
(
""
);
$
(
this
.
ui
.
entityInputData
).
on
(
'keyup change dp.change'
,
that
.
modal
.
$el
.
find
(
'input select textarea'
),
function
(
e
)
{
$
(
this
.
ui
.
entityInputData
).
on
(
'keyup change dp.change'
,
that
.
modal
.
$el
.
find
(
'input select textarea'
),
function
(
e
)
{
that
.
ui
.
entityInputData
.
find
(
"input,select,textarea"
).
each
(
function
()
{
that
.
ui
.
entityInputData
.
find
(
"input,select,textarea"
).
each
(
function
()
{
...
@@ -176,7 +176,7 @@ define(['require',
...
@@ -176,7 +176,7 @@ define(['require',
value
;
value
;
if
(
this
.
guid
)
{
if
(
this
.
guid
)
{
this
.
collection
.
each
(
function
(
val
)
{
this
.
collection
.
each
(
function
(
val
)
{
name
+=
val
.
get
(
"attributes"
).
name
||
val
.
get
(
"attributes"
).
qualifiedName
||
val
.
get
(
"attributes"
).
id
;
name
+=
_
.
escape
(
val
.
get
(
"attributes"
).
name
)
||
_
.
escape
(
val
.
get
(
"attributes"
).
qualifiedName
)
||
_
.
escape
(
val
.
get
(
"attributes"
).
id
)
;
that
.
entityData
=
val
;
that
.
entityData
=
val
;
});
});
this
.
ui
.
assetName
.
html
(
name
);
this
.
ui
.
assetName
.
html
(
name
);
...
@@ -187,7 +187,7 @@ define(['require',
...
@@ -187,7 +187,7 @@ define(['require',
return
model
.
get
(
'name'
);
return
model
.
get
(
'name'
);
}
}
this
.
collection
.
fullCollection
.
sort
().
each
(
function
(
val
)
{
this
.
collection
.
fullCollection
.
sort
().
each
(
function
(
val
)
{
str
+=
'<option>'
+
val
.
get
(
"name"
)
+
'</option>'
;
str
+=
'<option>'
+
_
.
escape
(
val
.
get
(
"name"
)
)
+
'</option>'
;
});
});
this
.
ui
.
entityList
.
html
(
str
);
this
.
ui
.
entityList
.
html
(
str
);
}
}
...
@@ -208,6 +208,7 @@ define(['require',
...
@@ -208,6 +208,7 @@ define(['require',
},
},
onEntityChange
:
function
(
e
,
value
)
{
onEntityChange
:
function
(
e
,
value
)
{
this
.
modal
.
$el
.
find
(
'button.ok'
).
prop
(
"disabled"
,
false
);
var
that
=
this
,
var
that
=
this
,
typeName
;
typeName
;
this
.
showLoader
();
this
.
showLoader
();
...
@@ -464,6 +465,7 @@ define(['require',
...
@@ -464,6 +465,7 @@ define(['require',
}
}
}
else
{
}
else
{
if
(
that
.
selectStoreCollection
.
length
&&
pickKey
)
{
if
(
that
.
selectStoreCollection
.
length
&&
pickKey
)
{
var
temp
=
{}
// I9 support;
var
temp
=
{}
// I9 support;
temp
[
pickKey
]
=
$
(
this
).
val
();
temp
[
pickKey
]
=
$
(
this
).
val
();
var
parseData
=
that
.
selectStoreCollection
.
findWhere
(
temp
).
toJSON
();
var
parseData
=
that
.
selectStoreCollection
.
findWhere
(
temp
).
toJSON
();
...
@@ -554,7 +556,7 @@ define(['require',
...
@@ -554,7 +556,7 @@ define(['require',
}
else
if
(
value
.
get
(
"id"
))
{
}
else
if
(
value
.
get
(
"id"
))
{
labelName
=
"id"
;
labelName
=
"id"
;
}
}
str
+=
'<option>'
+
value
.
get
(
labelName
)
+
'</option>'
;
str
+=
'<option>'
+
_
.
escape
(
value
.
get
(
labelName
)
)
+
'</option>'
;
});
});
}
}
}
}
...
@@ -591,7 +593,7 @@ define(['require',
...
@@ -591,7 +593,7 @@ define(['require',
var
dataValue
=
that
.
entityData
.
get
(
"attributes"
)[
keyData
];
var
dataValue
=
that
.
entityData
.
get
(
"attributes"
)[
keyData
];
if
(
dataValue
!==
null
)
{
if
(
dataValue
!==
null
)
{
_
.
each
(
dataValue
,
function
(
obj
)
{
_
.
each
(
dataValue
,
function
(
obj
)
{
str
+=
'<option>'
+
obj
+
'</option>'
;
str
+=
'<option>'
+
_
.
escape
(
obj
)
+
'</option>'
;
});
});
$this
.
html
(
str
);
$this
.
html
(
str
);
}
}
...
...
dashboardv2/public/js/views/schema/SchemaLayoutView.js
View file @
590b38ac
...
@@ -414,13 +414,13 @@ define(['require',
...
@@ -414,13 +414,13 @@ define(['require',
that
=
this
;
that
=
this
;
if
(
tagOrTerm
===
"term"
)
{
if
(
tagOrTerm
===
"term"
)
{
var
modal
=
CommonViewFunction
.
deleteTagModel
({
var
modal
=
CommonViewFunction
.
deleteTagModel
({
msg
:
"<div class='ellipsis'>Remove: "
+
"<b>"
+
tagName
+
"</b> assignment from"
+
" "
+
"<b>"
+
assetName
+
" ?</b></div>"
,
msg
:
"<div class='ellipsis'>Remove: "
+
"<b>"
+
_
.
escape
(
tagName
)
+
"</b> assignment from"
+
" "
+
"<b>"
+
assetName
+
" ?</b></div>"
,
titleMessage
:
Messages
.
removeTerm
,
titleMessage
:
Messages
.
removeTerm
,
buttonText
:
"Remove"
buttonText
:
"Remove"
});
});
}
else
if
(
tagOrTerm
===
"tag"
)
{
}
else
if
(
tagOrTerm
===
"tag"
)
{
var
modal
=
CommonViewFunction
.
deleteTagModel
({
var
modal
=
CommonViewFunction
.
deleteTagModel
({
msg
:
"<div class='ellipsis'>Remove: "
+
"<b>"
+
tagName
+
"</b> assignment from"
+
" "
+
"<b>"
+
assetName
+
" ?</b></div>"
,
msg
:
"<div class='ellipsis'>Remove: "
+
"<b>"
+
_
.
escape
(
tagName
)
+
"</b> assignment from"
+
" "
+
"<b>"
+
assetName
+
" ?</b></div>"
,
titleMessage
:
Messages
.
removeTag
,
titleMessage
:
Messages
.
removeTag
,
buttonText
:
"Remove"
buttonText
:
"Remove"
});
});
...
...
dashboardv2/public/js/views/search/SearchLayoutView.js
View file @
590b38ac
...
@@ -124,7 +124,7 @@ define(['require',
...
@@ -124,7 +124,7 @@ define(['require',
return
model
.
get
(
'name'
).
toLowerCase
();
return
model
.
get
(
'name'
).
toLowerCase
();
}
}
this
.
typecollection
.
fullCollection
.
sort
().
each
(
function
(
model
)
{
this
.
typecollection
.
fullCollection
.
sort
().
each
(
function
(
model
)
{
str
+=
'<option>'
+
model
.
get
(
"name"
)
+
'</option>'
;
str
+=
'<option>'
+
_
.
escape
(
model
.
get
(
"name"
)
)
+
'</option>'
;
});
});
that
.
ui
.
typeLov
.
html
(
str
);
that
.
ui
.
typeLov
.
html
(
str
);
},
},
...
...
dashboardv2/public/js/views/search/SearchResultLayoutView.js
View file @
590b38ac
...
@@ -269,7 +269,7 @@ define(['require',
...
@@ -269,7 +269,7 @@ define(['require',
if
(
that
.
searchCollection
.
models
.
length
)
{
if
(
that
.
searchCollection
.
models
.
length
)
{
that
.
startRenderTableProcess
();
that
.
startRenderTableProcess
();
}
}
var
resultData
=
'Results for <b>'
+
that
.
searchCollection
.
queryParams
.
query
+
'</b>'
;
var
resultData
=
'Results for <b>'
+
_
.
escape
(
that
.
searchCollection
.
queryParams
.
query
)
+
'</b>'
;
var
multiAssignDataTag
=
'<a href="javascript:void(0)" class="inputAssignTag multiSelectTag assignTag" style="display:none" data-id="addAssignTag"><i class="fa fa-plus"></i>'
+
" "
+
'Assign Tag</a>'
;
var
multiAssignDataTag
=
'<a href="javascript:void(0)" class="inputAssignTag multiSelectTag assignTag" style="display:none" data-id="addAssignTag"><i class="fa fa-plus"></i>'
+
" "
+
'Assign Tag</a>'
;
if
(
Globals
.
taxonomy
)
{
if
(
Globals
.
taxonomy
)
{
var
multiAssignDataTerm
=
'<a href="javascript:void(0)" class="inputAssignTag multiSelect" style="display:none" data-id="addTerm"><i class="fa fa-folder-o"></i>'
+
" "
+
'Assign Term</a>'
;
var
multiAssignDataTerm
=
'<a href="javascript:void(0)" class="inputAssignTag multiSelect" style="display:none" data-id="addTerm"><i class="fa fa-folder-o"></i>'
+
" "
+
'Assign Term</a>'
;
...
@@ -279,7 +279,8 @@ define(['require',
...
@@ -279,7 +279,8 @@ define(['require',
}
}
},
},
silent
:
true
silent
:
true
,
reset
:
true
});
});
},
},
startRenderTableProcess
:
function
()
{
startRenderTableProcess
:
function
()
{
...
@@ -444,13 +445,13 @@ define(['require',
...
@@ -444,13 +445,13 @@ define(['require',
}
}
}
}
if
(
model
.
get
(
'$id$'
))
{
if
(
model
.
get
(
'$id$'
))
{
nameHtml
=
'<a href="#!/detailPage/'
+
(
model
.
get
(
'$id$'
).
id
||
model
.
get
(
'$id$'
))
+
'">'
+
rawValue
+
'</a>'
;
nameHtml
=
'<a href="#!/detailPage/'
+
(
model
.
get
(
'$id$'
).
id
||
model
.
get
(
'$id$'
))
+
'">'
+
_
.
escape
(
rawValue
)
+
'</a>'
;
}
else
{
}
else
{
nameHtml
=
'<a>'
+
rawValue
+
'</a>'
;
nameHtml
=
'<a>'
+
_
.
escape
(
rawValue
)
+
'</a>'
;
}
}
if
(
model
.
get
(
'$id$'
)
&&
model
.
get
(
'$id$'
).
state
&&
Enums
.
entityStateReadOnly
[
model
.
get
(
'$id$'
).
state
])
{
if
(
model
.
get
(
'$id$'
)
&&
model
.
get
(
'$id$'
).
state
&&
Enums
.
entityStateReadOnly
[
model
.
get
(
'$id$'
).
state
])
{
nameHtml
+=
'<button type="button" title="Deleted" class="btn btn-atlasAction btn-atlas deleteBtn"><i class="fa fa-trash"></i></button>'
;
nameHtml
+=
'<button type="button" title="Deleted" class="btn btn-atlasAction btn-atlas deleteBtn"><i class="fa fa-trash"></i></button>'
;
return
'<div class="readOnly readOnlyLink">'
+
nameHtml
+
'</div>'
;
return
'<div class="readOnly readOnlyLink">'
+
_
.
escape
(
nameHtml
)
+
'</div>'
;
}
else
{
}
else
{
nameHtml
+=
'<button title="Edit" data-id="editEntityButton" data-giud= "'
+
(
model
.
get
(
'$id$'
).
id
||
model
.
get
(
'$id$'
))
+
'" class="btn btn-atlasAction btn-atlas editBtn"><i class="fa fa-pencil"></i></button>'
nameHtml
+=
'<button title="Edit" data-id="editEntityButton" data-giud= "'
+
(
model
.
get
(
'$id$'
).
id
||
model
.
get
(
'$id$'
))
+
'" class="btn btn-atlasAction btn-atlas editBtn"><i class="fa fa-pencil"></i></button>'
return
nameHtml
;
return
nameHtml
;
...
@@ -488,7 +489,7 @@ define(['require',
...
@@ -488,7 +489,7 @@ define(['require',
nameHtml
+=
'<button type="button" title="Deleted" class="btn btn-atlasAction btn-atlas deleteBtn"><i class="fa fa-trash"></i></button>'
;
nameHtml
+=
'<button type="button" title="Deleted" class="btn btn-atlasAction btn-atlas deleteBtn"><i class="fa fa-trash"></i></button>'
;
return
'<div class="readOnly readOnlyLink">'
+
nameHtml
+
'</div>'
;
return
'<div class="readOnly readOnlyLink">'
+
nameHtml
+
'</div>'
;
}
else
{
}
else
{
nameHtml
+=
'<button title="Edit" data-giud= "'
+
(
model
.
get
(
'$id$'
).
id
||
model
.
get
(
'$id$'
))
+
'" class="btn btn-atlasAction btn-atlas editBtn"><i class="fa fa-pencil"></i></button>'
nameHtml
+=
'<button title="Edit" data-giud= "'
+
(
model
.
get
(
'$id$'
).
id
||
model
.
get
(
'$id$'
))
+
'" class="btn btn-atlasAction btn-atlas editBtn"><i class="fa fa-pencil"></i></button>'
return
nameHtml
;
return
nameHtml
;
}
}
}
}
...
@@ -619,13 +620,13 @@ define(['require',
...
@@ -619,13 +620,13 @@ define(['require',
that
=
this
;
that
=
this
;
if
(
tagOrTerm
===
"term"
)
{
if
(
tagOrTerm
===
"term"
)
{
var
modal
=
CommonViewFunction
.
deleteTagModel
({
var
modal
=
CommonViewFunction
.
deleteTagModel
({
msg
:
"<div class='ellipsis'>Remove: "
+
"<b>"
+
tagName
+
"</b> assignment from"
+
" "
+
"<b>"
+
assetName
+
" ?</b></div>"
,
msg
:
"<div class='ellipsis'>Remove: "
+
"<b>"
+
_
.
escape
(
tagName
)
+
"</b> assignment from"
+
" "
+
"<b>"
+
assetName
+
" ?</b></div>"
,
titleMessage
:
Messages
.
removeTerm
,
titleMessage
:
Messages
.
removeTerm
,
buttonText
:
"Remove"
buttonText
:
"Remove"
});
});
}
else
if
(
tagOrTerm
===
"tag"
)
{
}
else
if
(
tagOrTerm
===
"tag"
)
{
var
modal
=
CommonViewFunction
.
deleteTagModel
({
var
modal
=
CommonViewFunction
.
deleteTagModel
({
msg
:
"<div class='ellipsis'>Remove: "
+
"<b>"
+
tagName
+
"</b> assignment from"
+
" "
+
"<b>"
+
assetName
+
" ?</b></div>"
,
msg
:
"<div class='ellipsis'>Remove: "
+
"<b>"
+
_
.
escape
(
tagName
)
+
"</b> assignment from"
+
" "
+
"<b>"
+
assetName
+
" ?</b></div>"
,
titleMessage
:
Messages
.
removeTag
,
titleMessage
:
Messages
.
removeTag
,
buttonText
:
"Remove"
buttonText
:
"Remove"
});
});
...
...
dashboardv2/public/js/views/tag/CreateTagLayoutView.js
View file @
590b38ac
...
@@ -87,7 +87,7 @@ define(['require',
...
@@ -87,7 +87,7 @@ define(['require',
if
(
this
.
create
)
{
if
(
this
.
create
)
{
this
.
tagCollectionList
();
this
.
tagCollectionList
();
}
else
{
}
else
{
this
.
ui
.
title
.
html
(
'<span>'
+
this
.
tag
+
'</span>'
);
this
.
ui
.
title
.
html
(
'<span>'
+
_
.
escape
(
this
.
tag
)
+
'</span>'
);
}
}
if
(
!
(
'placeholder'
in
HTMLInputElement
.
prototype
))
{
if
(
!
(
'placeholder'
in
HTMLInputElement
.
prototype
))
{
this
.
ui
.
createTagForm
.
find
(
'input,textarea'
).
placeholder
();
this
.
ui
.
createTagForm
.
find
(
'input,textarea'
).
placeholder
();
...
@@ -98,7 +98,7 @@ define(['require',
...
@@ -98,7 +98,7 @@ define(['require',
that
=
this
;
that
=
this
;
this
.
ui
.
parentTag
.
empty
();
this
.
ui
.
parentTag
.
empty
();
this
.
tagCollection
.
fullCollection
.
each
(
function
(
val
)
{
this
.
tagCollection
.
fullCollection
.
each
(
function
(
val
)
{
str
+=
'<option>'
+
val
.
get
(
"name"
)
+
'</option>'
;
str
+=
'<option>'
+
_
.
escape
(
val
.
get
(
"name"
)
)
+
'</option>'
;
});
});
that
.
ui
.
parentTag
.
html
(
str
);
that
.
ui
.
parentTag
.
html
(
str
);
console
.
log
(
platform
);
console
.
log
(
platform
);
...
...
dashboardv2/public/js/views/tag/TagAttributeDetailLayoutView.js
View file @
590b38ac
...
@@ -46,6 +46,7 @@ define(['require',
...
@@ -46,6 +46,7 @@ define(['require',
addTagListBtn
:
'[data-id="addTagListBtn"]'
,
addTagListBtn
:
'[data-id="addTagListBtn"]'
,
addTagtext
:
'[data-id="addTagtext"]'
,
addTagtext
:
'[data-id="addTagtext"]'
,
addTagPlus
:
'[data-id="addTagPlus"]'
,
addTagPlus
:
'[data-id="addTagPlus"]'
,
addTagBtn
:
'[data-id="addTagBtn"]'
,
description
:
'[data-id="description"]'
,
description
:
'[data-id="description"]'
,
descriptionTextArea
:
'[data-id="descriptionTextArea"]'
,
descriptionTextArea
:
'[data-id="descriptionTextArea"]'
,
publishButton
:
'[data-id="publishButton"]'
publishButton
:
'[data-id="publishButton"]'
...
@@ -69,13 +70,29 @@ define(['require',
...
@@ -69,13 +70,29 @@ define(['require',
bindEvents
:
function
()
{
bindEvents
:
function
()
{
this
.
listenTo
(
this
.
collection
,
'reset'
,
function
()
{
this
.
listenTo
(
this
.
collection
,
'reset'
,
function
()
{
this
.
model
=
this
.
collection
.
fullCollection
.
findWhere
({
name
:
this
.
tag
});
this
.
model
=
this
.
collection
.
fullCollection
.
findWhere
({
name
:
this
.
tag
});
/// this.model = this.collection.fullCollection.findWhere({ typeName: $(".dataTypeSelector").val() });
if
(
this
.
model
)
{
this
.
renderTagDetail
();
this
.
renderTagDetail
();
}
else
{
this
.
ui
.
addTagBtn
.
hide
();
this
.
ui
.
editButton
.
hide
();
Utils
.
notifyError
({
content
:
'Something went wrong'
});
}
},
this
);
},
this
);
this
.
listenTo
(
this
.
tagCollection
,
'error'
,
function
(
error
,
response
)
{
this
.
listenTo
(
this
.
tagCollection
,
'error'
,
function
(
error
,
response
)
{
this
.
ui
.
addTagBtn
.
hide
();
this
.
ui
.
editButton
.
hide
();
if
(
response
.
responseJSON
&&
response
.
responseJSON
.
error
)
{
if
(
response
.
responseJSON
&&
response
.
responseJSON
.
error
)
{
Utils
.
notifyError
({
Utils
.
notifyError
({
content
:
response
.
responseJSON
.
error
content
:
response
.
responseJSON
.
error
});
});
}
else
{
Utils
.
notifyError
({
content
:
'Something went wrong'
});
}
}
},
this
);
},
this
);
...
@@ -93,17 +110,17 @@ define(['require',
...
@@ -93,17 +110,17 @@ define(['require',
var
attributeData
=
""
,
var
attributeData
=
""
,
attributeDefs
=
this
.
model
.
get
(
"attributeDefs"
);
attributeDefs
=
this
.
model
.
get
(
"attributeDefs"
);
if
(
this
.
model
.
get
(
"name"
))
{
if
(
this
.
model
.
get
(
"name"
))
{
this
.
ui
.
title
.
html
(
'<span>'
+
this
.
model
.
get
(
"name"
)
+
'</span>'
);
this
.
ui
.
title
.
html
(
'<span>'
+
_
.
escape
(
this
.
model
.
get
(
"name"
)
)
+
'</span>'
);
}
}
if
(
this
.
model
.
get
(
"description"
))
{
if
(
this
.
model
.
get
(
"description"
))
{
this
.
ui
.
description
.
html
(
this
.
model
.
get
(
"description"
));
this
.
ui
.
description
.
text
(
this
.
model
.
get
(
"description"
));
}
}
if
(
this
.
model
.
get
(
"attributeDefs"
))
{
if
(
this
.
model
.
get
(
"attributeDefs"
))
{
if
(
!
_
.
isArray
(
attributeDefs
))
{
if
(
!
_
.
isArray
(
attributeDefs
))
{
attributeDefs
=
[
attributeDefs
];
attributeDefs
=
[
attributeDefs
];
}
}
_
.
each
(
attributeDefs
,
function
(
value
,
key
)
{
_
.
each
(
attributeDefs
,
function
(
value
,
key
)
{
attributeData
+=
'<span class="inputAttribute">'
+
value
.
name
+
'</span>'
;
attributeData
+=
'<span class="inputAttribute">'
+
_
.
escape
(
value
.
name
)
+
'</span>'
;
});
});
this
.
ui
.
showAttribute
.
html
(
attributeData
);
this
.
ui
.
showAttribute
.
html
(
attributeData
);
}
}
...
@@ -190,11 +207,11 @@ define(['require',
...
@@ -190,11 +207,11 @@ define(['require',
this
.
ui
.
editButton
.
show
();
this
.
ui
.
editButton
.
show
();
this
.
ui
.
editBox
.
hide
();
this
.
ui
.
editBox
.
hide
();
},
},
textAreaChangeEvent
:
function
(
view
,
modal
)
{
textAreaChangeEvent
:
function
(
view
)
{
if
(
this
.
model
.
get
(
'description'
)
===
view
.
ui
.
description
.
val
())
{
if
(
this
.
model
.
get
(
'description'
)
===
view
.
ui
.
description
.
val
())
{
modal
.
$el
.
find
(
'button.ok'
).
prop
(
'disabled'
,
true
);
this
.
modal
.
$el
.
find
(
'button.ok'
).
prop
(
'disabled'
,
true
);
}
else
{
}
else
{
modal
.
$el
.
find
(
'button.ok'
).
prop
(
'disabled'
,
false
);
this
.
modal
.
$el
.
find
(
'button.ok'
).
prop
(
'disabled'
,
false
);
}
}
},
},
onPublishClick
:
function
(
view
)
{
onPublishClick
:
function
(
view
)
{
...
@@ -210,7 +227,7 @@ define(['require',
...
@@ -210,7 +227,7 @@ define(['require',
'modules/Modal'
'modules/Modal'
],
function
(
CreateTagLayoutView
,
Modal
)
{
],
function
(
CreateTagLayoutView
,
Modal
)
{
var
view
=
new
CreateTagLayoutView
({
'tagCollection'
:
that
.
collection
,
'model'
:
that
.
model
,
'tag'
:
that
.
tag
});
var
view
=
new
CreateTagLayoutView
({
'tagCollection'
:
that
.
collection
,
'model'
:
that
.
model
,
'tag'
:
that
.
tag
});
var
modal
=
new
Modal
({
that
.
modal
=
new
Modal
({
title
:
'Edit Tag'
,
title
:
'Edit Tag'
,
content
:
view
,
content
:
view
,
cancelText
:
"Cancel"
,
cancelText
:
"Cancel"
,
...
@@ -218,14 +235,14 @@ define(['require',
...
@@ -218,14 +235,14 @@ define(['require',
allowCancel
:
true
,
allowCancel
:
true
,
}).
open
();
}).
open
();
view
.
ui
.
description
.
on
(
'keyup'
,
function
(
e
)
{
view
.
ui
.
description
.
on
(
'keyup'
,
function
(
e
)
{
that
.
textAreaChangeEvent
(
view
,
modal
);
that
.
textAreaChangeEvent
(
view
);
});
});
modal
.
$el
.
find
(
'button.ok'
).
prop
(
'disabled'
,
true
);
that
.
modal
.
$el
.
find
(
'button.ok'
).
prop
(
'disabled'
,
true
);
modal
.
on
(
'ok'
,
function
()
{
that
.
modal
.
on
(
'ok'
,
function
()
{
that
.
onPublishClick
(
view
);
that
.
onPublishClick
(
view
);
});
});
modal
.
on
(
'closeModal'
,
function
()
{
that
.
modal
.
on
(
'closeModal'
,
function
()
{
modal
.
trigger
(
'cancel'
);
that
.
modal
.
trigger
(
'cancel'
);
});
});
});
});
}
}
...
...
dashboardv2/public/js/views/tag/TagDetailTableLayoutView.js
View file @
590b38ac
...
@@ -136,7 +136,7 @@ define(['require',
...
@@ -136,7 +136,7 @@ define(['require',
var
stringArr
=
[];
var
stringArr
=
[];
tagValue
=
""
;
tagValue
=
""
;
_
.
each
(
values
,
function
(
val
,
key
)
{
_
.
each
(
values
,
function
(
val
,
key
)
{
var
attrName
=
"<span>"
+
key
+
":"
+
val
+
"</span>"
;
var
attrName
=
"<span>"
+
_
.
escape
(
key
)
+
":"
+
_
.
escape
(
val
)
+
"</span>"
;
stringArr
.
push
(
attrName
);
stringArr
.
push
(
attrName
);
});
});
tagValue
+=
stringArr
.
join
(
", "
);
tagValue
+=
stringArr
.
join
(
", "
);
...
@@ -178,13 +178,13 @@ define(['require',
...
@@ -178,13 +178,13 @@ define(['require',
that
=
this
;
that
=
this
;
if
(
that
.
term
)
{
if
(
that
.
term
)
{
var
modal
=
CommonViewFunction
.
deleteTagModel
({
var
modal
=
CommonViewFunction
.
deleteTagModel
({
msg
:
"<div class='ellipsis'>Remove: "
+
"<b>"
+
tagName
+
"</b> assignment from"
+
" "
+
"<b>"
+
this
.
assetName
+
"?</b></div>"
,
msg
:
"<div class='ellipsis'>Remove: "
+
"<b>"
+
_
.
escape
(
tagName
)
+
"</b> assignment from"
+
" "
+
"<b>"
+
this
.
assetName
+
"?</b></div>"
,
titleMessage
:
Messages
.
removeTerm
,
titleMessage
:
Messages
.
removeTerm
,
buttonText
:
"Remove"
,
buttonText
:
"Remove"
,
});
});
}
else
{
}
else
{
var
modal
=
CommonViewFunction
.
deleteTagModel
({
var
modal
=
CommonViewFunction
.
deleteTagModel
({
msg
:
"<div class='ellipsis'>Remove: "
+
"<b>"
+
tagName
+
"</b> assignment from"
+
" "
+
"<b>"
+
this
.
assetName
+
"?</b></div>"
,
msg
:
"<div class='ellipsis'>Remove: "
+
"<b>"
+
_
.
escape
(
tagName
)
+
"</b> assignment from"
+
" "
+
"<b>"
+
this
.
assetName
+
"?</b></div>"
,
titleMessage
:
Messages
.
removeTag
,
titleMessage
:
Messages
.
removeTag
,
buttonText
:
"Remove"
,
buttonText
:
"Remove"
,
});
});
...
...
dashboardv2/public/js/views/tag/TagLayoutView.js
View file @
590b38ac
...
@@ -147,15 +147,16 @@ define(['require',
...
@@ -147,15 +147,16 @@ define(['require',
return
model
.
get
(
'name'
).
toLowerCase
();
return
model
.
get
(
'name'
).
toLowerCase
();
};
};
that
.
collection
.
fullCollection
.
sort
().
each
(
function
(
model
)
{
that
.
collection
.
fullCollection
.
sort
().
each
(
function
(
model
)
{
var
name
=
_
.
escape
(
model
.
get
(
'name'
))
if
(
searchString
)
{
if
(
searchString
)
{
if
(
model
.
get
(
'name'
)
.
search
(
new
RegExp
(
searchString
,
"i"
))
!=
-
1
)
{
if
(
name
.
search
(
new
RegExp
(
searchString
,
"i"
))
!=
-
1
)
{
// data-name="<space>'<tagName>'" Space is required for DSL search Input
// data-name="<space>'<tagName>'" Space is required for DSL search Input
str
+=
'<li class="parent-node" data-id="tags"><div class="tools"><i class="fa fa-ellipsis-h tagPopover"></i></div><a href="#!/tag/tagAttribute/'
+
model
.
get
(
'name'
)
+
'" data-name="`'
+
model
.
get
(
'name'
)
+
'`" >'
+
model
.
get
(
'name'
)
+
'</a></li>'
;
str
+=
'<li class="parent-node" data-id="tags"><div class="tools"><i class="fa fa-ellipsis-h tagPopover"></i></div><a href="#!/tag/tagAttribute/'
+
name
+
'" data-name=" `'
+
name
+
'`" >'
+
name
+
'</a></li>'
;
}
else
{
}
else
{
return
;
return
;
}
}
}
else
{
}
else
{
str
+=
'<li class="parent-node" data-id="tags"><div class="tools"><i class="fa fa-ellipsis-h tagPopover"></i></div><a href="#!/tag/tagAttribute/'
+
model
.
get
(
'name'
)
+
'" data-name="`'
+
model
.
get
(
'name'
)
+
'`">'
+
model
.
get
(
'name'
)
+
'</a></li>'
;
str
+=
'<li class="parent-node" data-id="tags"><div class="tools"><i class="fa fa-ellipsis-h tagPopover"></i></div><a href="#!/tag/tagAttribute/'
+
name
+
'" data-name=" `'
+
name
+
'`">'
+
name
+
'</a></li>'
;
}
}
});
});
this
.
ui
.
tagsParent
.
empty
().
html
(
str
);
this
.
ui
.
tagsParent
.
empty
().
html
(
str
);
...
@@ -187,7 +188,7 @@ define(['require',
...
@@ -187,7 +188,7 @@ define(['require',
modal
.
$el
.
find
(
'button.ok'
).
removeAttr
(
"disabled"
);
modal
.
$el
.
find
(
'button.ok'
).
removeAttr
(
"disabled"
);
});
});
view
.
ui
.
tagName
.
on
(
'keyup'
,
function
(
e
)
{
view
.
ui
.
tagName
.
on
(
'keyup'
,
function
(
e
)
{
if
(
e
.
keyCode
==
8
&&
e
.
currentTarget
.
value
==
""
)
{
if
(
(
e
.
keyCode
==
8
||
e
.
keyCode
==
32
||
e
.
keyCode
==
46
)
&&
e
.
currentTarget
.
value
==
""
)
{
modal
.
$el
.
find
(
'button.ok'
).
attr
(
"disabled"
,
"true"
);
modal
.
$el
.
find
(
'button.ok'
).
attr
(
"disabled"
,
"true"
);
}
}
});
});
...
...
dashboardv2/public/js/views/tag/addTagModalView.js
View file @
590b38ac
...
@@ -57,6 +57,7 @@ define(['require',
...
@@ -57,6 +57,7 @@ define(['require',
cancelText
:
"Cancel"
,
cancelText
:
"Cancel"
,
allowCancel
:
true
,
allowCancel
:
true
,
}).
open
();
}).
open
();
this
.
modal
.
$el
.
find
(
'button.ok'
).
attr
(
"disabled"
,
true
);
this
.
on
(
'ok'
,
function
()
{
this
.
on
(
'ok'
,
function
()
{
var
tagName
=
this
.
ui
.
addTagOptions
.
val
();
var
tagName
=
this
.
ui
.
addTagOptions
.
val
();
var
tagAttributes
=
{};
var
tagAttributes
=
{};
...
@@ -103,11 +104,11 @@ define(['require',
...
@@ -103,11 +104,11 @@ define(['require',
this
.
tagsCollection
();
this
.
tagsCollection
();
},
this
);
},
this
);
this
.
listenTo
(
this
.
commonCollection
,
'reset'
,
function
()
{
this
.
listenTo
(
this
.
commonCollection
,
'reset'
,
function
()
{
--
this
.
asyncAttrFetchCounter
;
--
this
.
asyncAttrFetchCounter
this
.
subAttributeData
();
this
.
subAttributeData
();
},
this
);
},
this
);
this
.
listenTo
(
this
.
commonCollection
,
'error'
,
function
()
{
this
.
listenTo
(
this
.
commonCollection
,
'error'
,
function
()
{
--
this
.
asyncAttrFetchCounter
;
--
this
.
asyncAttrFetchCounter
this
.
$
(
'.attrLoader'
).
hide
();
this
.
$
(
'.attrLoader'
).
hide
();
},
this
);
},
this
);
},
},
...
@@ -118,17 +119,17 @@ define(['require',
...
@@ -118,17 +119,17 @@ define(['require',
var
str
=
'<option selected="selected" disabled="disabled">-- Select a tag from the dropdown list --</option>'
;
var
str
=
'<option selected="selected" disabled="disabled">-- Select a tag from the dropdown list --</option>'
;
this
.
collection
.
fullCollection
.
sort
().
each
(
function
(
obj
,
key
)
{
this
.
collection
.
fullCollection
.
sort
().
each
(
function
(
obj
,
key
)
{
str
+=
'<option>'
+
obj
.
get
(
'name'
)
+
'</option>'
;
str
+=
'<option>'
+
_
.
escape
(
obj
.
get
(
'name'
)
)
+
'</option>'
;
});
});
this
.
ui
.
addTagOptions
.
html
(
str
);
this
.
ui
.
addTagOptions
.
html
(
str
);
this
.
ui
.
addTagOptions
.
select2
({
this
.
ui
.
addTagOptions
.
select2
({
placeholder
:
"Select Tag"
,
placeholder
:
"Select Tag"
,
allowClear
:
tru
e
allowClear
:
fals
e
});
});
},
},
onChangeTagDefination
:
function
()
{
onChangeTagDefination
:
function
()
{
this
.
ui
.
tagAttribute
.
empty
();
this
.
ui
.
tagAttribute
.
empty
();
var
saveBtn
=
this
.
modal
.
$el
.
find
(
'
.btn-success
'
);
var
saveBtn
=
this
.
modal
.
$el
.
find
(
'
button.ok
'
);
saveBtn
.
prop
(
"disabled"
,
false
);
saveBtn
.
prop
(
"disabled"
,
false
);
var
tagname
=
this
.
ui
.
addTagOptions
.
val
();
var
tagname
=
this
.
ui
.
addTagOptions
.
val
();
this
.
hideAttributeBox
();
this
.
hideAttributeBox
();
...
@@ -157,7 +158,7 @@ define(['require',
...
@@ -157,7 +158,7 @@ define(['require',
if
(
this
.
commonCollection
.
models
[
0
])
{
if
(
this
.
commonCollection
.
models
[
0
])
{
if
(
this
.
commonCollection
.
models
[
0
].
get
(
'attributeDefs'
))
{
if
(
this
.
commonCollection
.
models
[
0
].
get
(
'attributeDefs'
))
{
_
.
each
(
this
.
commonCollection
.
models
[
0
].
get
(
'attributeDefs'
),
function
(
obj
)
{
_
.
each
(
this
.
commonCollection
.
models
[
0
].
get
(
'attributeDefs'
),
function
(
obj
)
{
that
.
ui
.
tagAttribute
.
append
(
'<div class="form-group"><label>'
+
obj
.
name
+
'</label>'
+
that
.
ui
.
tagAttribute
.
append
(
'<div class="form-group"><label>'
+
_
.
escape
(
obj
.
name
)
+
'</label>'
+
'<input type="text" class="form-control attributeInputVal attrName" data-key="'
+
obj
.
name
+
'" ></input></div>'
);
'<input type="text" class="form-control attributeInputVal attrName" data-key="'
+
obj
.
name
+
'" ></input></div>'
);
});
});
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment