diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 00000000..fbf9358b
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,14 @@
+# Set the default behavior, in case people don't have core.autocrlf set.
+* text=auto
+
+# Explicitly declare text files you want to always be normalized and converted
+# to native line endings on checkout.
+*.c text
+*.h text
+
+# Declare files that will always have CRLF line endings on checkout.
+*.sln text eol=crlf
+
+# Denote all files that are truly binary and should not be modified.
+*.png binary
+*.jpg binary
diff --git a/assets/help_viewer.css b/assets/help_viewer.css
index fcff1179..d421830b 100755
--- a/assets/help_viewer.css
+++ b/assets/help_viewer.css
@@ -1,18 +1,18 @@
-#help-viewer-panel .bd {
- overflow:auto;
- background-color:fff;
- padding:10px;
-}
-
-#help-viewer-panel .ft {
- height:15px;
- padding:0;
-}
-
-#help-viewer-panel .yui-resize-handle-br {
- right:0;
- bottom:0;
- height: 8px;
- width: 8px;
- position:absolute;
+#help-viewer-panel .bd {
+ overflow:auto;
+ background-color:fff;
+ padding:10px;
+}
+
+#help-viewer-panel .ft {
+ height:15px;
+ padding:0;
+}
+
+#help-viewer-panel .yui-resize-handle-br {
+ right:0;
+ bottom:0;
+ height: 8px;
+ width: 8px;
+ position:absolute;
}
\ No newline at end of file
diff --git a/assets/mod-treeview.css b/assets/mod-treeview.css
index fbbb3228..9b49ee7f 100755
--- a/assets/mod-treeview.css
+++ b/assets/mod-treeview.css
@@ -1,17 +1,17 @@
-
-.ygtvtn, .ygtvtm, .ygtvtmh,
-.ygtvtp, .ygtvtph, .ygtvln,
-.ygtvlm, .ygtvlmh, .ygtvlp,
-.ygtvlph, .ygtvloading, .ygtvdepthcell,
-.ygtvblankdepthcell {
- width:16px !important;
- height:18px !important;
-}
-
-.ygtvspacer {
- height: 10px !important;
- width: 10px !important;
- margin:0px 4px !important;
- text-decoration: none !important;
- display: block;
-}
+
+.ygtvtn, .ygtvtm, .ygtvtmh,
+.ygtvtp, .ygtvtph, .ygtvln,
+.ygtvlm, .ygtvlmh, .ygtvlp,
+.ygtvlph, .ygtvloading, .ygtvdepthcell,
+.ygtvblankdepthcell {
+ width:16px !important;
+ height:18px !important;
+}
+
+.ygtvspacer {
+ height: 10px !important;
+ width: 10px !important;
+ margin:0px 4px !important;
+ text-decoration: none !important;
+ display: block;
+}
diff --git a/assets/msg-viewer.html b/assets/msg-viewer.html
index d7475068..20739c36 100755
--- a/assets/msg-viewer.html
+++ b/assets/msg-viewer.html
@@ -1,401 +1,401 @@
-
-
-
- Message Log
-
-
-
-
-
-
-
-
-
-
-
-
-
-
sent
-
rcvd
-
-
action
-
cell
-
-
-
- called by origin @
- T+1
-
-
-
-
-
-
+
+
+
+ Message Log
+
+
+
+
+
+
+
+
+
+
+
+
+
+
sent
+
rcvd
+
+
action
+
cell
+
+
+
+ called by origin @
+ T+1
+
+
+
+
+
+
\ No newline at end of file
diff --git a/assets/msg_sniffer.css b/assets/msg_sniffer.css
index f89c6b2c..5016b574 100755
--- a/assets/msg_sniffer.css
+++ b/assets/msg_sniffer.css
@@ -1,83 +1,83 @@
-#commViewerSingleMsg-body PRE.msgXML.msgSent {
- border-left: 8px solid #FFAFAF;
- padding: 4px;
-}
-
-#commViewerSingleMsg-body PRE.msgXML.msgReceive {
- border-left: 8px solid #AFFFAF;
- padding: 4px;
-}
-
-
-BODY.msgSnifferViewer {
- margin:0px;
- padding:0px;
- background:#BCE
-}
-
-BODY.msgSnifferViewer DIV.IndexRecord {
- font-size:10px !important;
- clear:both;
- padding:2px;
- cursor: pointer;
- width:250px;
-}
-
-BODY.msgSnifferViewer DIV.IndexRecord.selected { background-color: #FFD }
-
-BODY.msgSnifferViewer DIV.msgChan,
-BODY.msgSnifferViewer DIV.msgAction,
-BODY.msgSnifferViewer DIV.msgOrigin,
-BODY.msgSnifferViewer DIV.msgTime,
-{
- line-height: 10px;
- font-size: 10px !important;
-}
-
-BODY.msgSnifferViewer DIV.recvStatus,
-BODY.msgSnifferViewer DIV.sentStatus {
- height: 12px;
- width:22px;
- float: left;
- border: 1px solid #000;
- text-align: center;
- line-height:10px;
- font-size:10px;
-}
-
-BODY.msgSnifferViewer DIV.sentStatus {
- background: #E99;
- border-bottom: none;
-}
-BODY.msgSnifferViewer DIV.recvStatus {
- background: #9E9;
- clear:both;
-}
-
-
-BODY.msgSnifferViewer DIV.msgXML {
- background:#FFFFFF;
- border:1px solid #678;
- border-top:none;
- xheight:100%;
- xoverflow:scroll;
- xwidth:100%;
-}
-BODY.msgSnifferViewer pre.msgXML {
- border-left:8px solid;
- padding:4px;
-}
-BODY.msgSnifferViewer pre.msgXML.msgSent {
- border-color:#FFAFAF;
-}
-BODY.msgSnifferViewer pre.msgXML.msgRcvd {
- border-color:#AFFFAF;
-}
-
-BODY.msgSnifferViewer DIV.recvStatus.msgError {
- background:#FFFF90 !important;
-}
-
-body.msgSnifferViewer pre.msgXML.msgError {
- border-color:#FFFF90 !important;
-}
+#commViewerSingleMsg-body PRE.msgXML.msgSent {
+ border-left: 8px solid #FFAFAF;
+ padding: 4px;
+}
+
+#commViewerSingleMsg-body PRE.msgXML.msgReceive {
+ border-left: 8px solid #AFFFAF;
+ padding: 4px;
+}
+
+
+BODY.msgSnifferViewer {
+ margin:0px;
+ padding:0px;
+ background:#BCE
+}
+
+BODY.msgSnifferViewer DIV.IndexRecord {
+ font-size:10px !important;
+ clear:both;
+ padding:2px;
+ cursor: pointer;
+ width:250px;
+}
+
+BODY.msgSnifferViewer DIV.IndexRecord.selected { background-color: #FFD }
+
+BODY.msgSnifferViewer DIV.msgChan,
+BODY.msgSnifferViewer DIV.msgAction,
+BODY.msgSnifferViewer DIV.msgOrigin,
+BODY.msgSnifferViewer DIV.msgTime,
+{
+ line-height: 10px;
+ font-size: 10px !important;
+}
+
+BODY.msgSnifferViewer DIV.recvStatus,
+BODY.msgSnifferViewer DIV.sentStatus {
+ height: 12px;
+ width:22px;
+ float: left;
+ border: 1px solid #000;
+ text-align: center;
+ line-height:10px;
+ font-size:10px;
+}
+
+BODY.msgSnifferViewer DIV.sentStatus {
+ background: #E99;
+ border-bottom: none;
+}
+BODY.msgSnifferViewer DIV.recvStatus {
+ background: #9E9;
+ clear:both;
+}
+
+
+BODY.msgSnifferViewer DIV.msgXML {
+ background:#FFFFFF;
+ border:1px solid #678;
+ border-top:none;
+ xheight:100%;
+ xoverflow:scroll;
+ xwidth:100%;
+}
+BODY.msgSnifferViewer pre.msgXML {
+ border-left:8px solid;
+ padding:4px;
+}
+BODY.msgSnifferViewer pre.msgXML.msgSent {
+ border-color:#FFAFAF;
+}
+BODY.msgSnifferViewer pre.msgXML.msgRcvd {
+ border-color:#AFFFAF;
+}
+
+BODY.msgSnifferViewer DIV.recvStatus.msgError {
+ background:#FFFF90 !important;
+}
+
+body.msgSnifferViewer pre.msgXML.msgError {
+ border-color:#FFFF90 !important;
+}
diff --git a/assets/msg_snifferIE6.css b/assets/msg_snifferIE6.css
index af4933d8..d1758fd0 100755
--- a/assets/msg_snifferIE6.css
+++ b/assets/msg_snifferIE6.css
@@ -1,21 +1,21 @@
-DIV#sniffer_Filters {
- width: 722px !important;
-}
-DIV#sniffer_MatchMsgDisp {
- height: 448px !important;
- top: 30px !important;
- width: 472px !important;
-}
-DIV#sniffer_MatchMsgList {
- height: 448px !important;
- top: 30px !important;
-}
-
-DIV#sniffer_ListButtons {
- top: 441px !important;
- height: 36px !important;
-}
-
-TBODY TR TD {
- font-size: 10px !important;
+DIV#sniffer_Filters {
+ width: 722px !important;
+}
+DIV#sniffer_MatchMsgDisp {
+ height: 448px !important;
+ top: 30px !important;
+ width: 472px !important;
+}
+DIV#sniffer_MatchMsgList {
+ height: 448px !important;
+ top: 30px !important;
+}
+
+DIV#sniffer_ListButtons {
+ top: 441px !important;
+ height: 36px !important;
+}
+
+TBODY TR TD {
+ font-size: 10px !important;
}
\ No newline at end of file
diff --git a/assets/new-treeview.css b/assets/new-treeview.css
index 205c9e4e..931230b2 100755
--- a/assets/new-treeview.css
+++ b/assets/new-treeview.css
@@ -1,104 +1,104 @@
-/*
-Copyright (c) 2008, Yahoo! Inc. All rights reserved.
-Code licensed under the BSD License:
-http://developer.yahoo.net/yui/license.txt
-version: 2.5.1
-*/
-/* first or middle sibling, no children */
-
-.ygtvtn {
- width:16px; height:18px;
- background: url(sprite-orig.gif) 0 -5600px no-repeat;
-}
-
-/* first or middle sibling, collapsable */
-.ygtvtm {
- width:16px; height:18px;
- cursor:pointer ;
- background: url(sprite-orig.gif) 0 -4000px no-repeat;
-}
-
-/* first or middle sibling, collapsable, hover */
-.ygtvtmh {
- width:16px; height:18px;
- cursor:pointer ;
- background: url(sprite-orig.gif) 0 -4800px no-repeat;
-}
-
-/* first or middle sibling, expandable */
-.ygtvtp {
- width:16px; height:18px;
- cursor:pointer ;
- background: url(sprite-orig.gif) 0 -6400px no-repeat;
-}
-
-/* first or middle sibling, expandable, hover */
-.ygtvtph {
- width:16px; height:18px;
- cursor:pointer ;
- background: url(sprite-orig.gif) 0 -7200px no-repeat;
-}
-
-/* last sibling, no children */
-.ygtvln {
- width:16px; height:18px;
- background: url(sprite-orig.gif) 0 -1600px no-repeat;
-}
-
-/* Last sibling, collapsable */
-.ygtvlm {
- width:16px; height:18px;
- cursor:pointer ;
- background: url(sprite-orig.gif) 0 0px no-repeat;
-}
-
-/* Last sibling, collapsable, hover */
-.ygtvlmh {
- width:16px; height:18px;
- cursor:pointer ;
- background: url(sprite-orig.gif) 0 -800px no-repeat;
-}
-
-/* Last sibling, expandable */
-.ygtvlp {
- width:16px; height:18px;
- cursor:pointer ;
- background: url(sprite-orig.gif) 0 -2400px no-repeat;
-}
-
-/* Last sibling, expandable, hover */
-.ygtvlph {
- width:16px; height:18px; cursor:pointer ;
- background: url(sprite-orig.gif) 0 -3200px no-repeat;
-}
-
-/* Loading icon */
-.ygtvloading {
- width:16px; height:18px; cursor:pointer ;
- background: url(treeview-loading.gif) 0 0 no-repeat;
-}
-
-/* the style for the empty cells that are used for rendering the depth
- * of the node */
-.ygtvdepthcell {
- width:16px; height:18px;
- background: url(sprite-orig.gif) 0 -8000px no-repeat;
-}
-
-.ygtvblankdepthcell { width:16px; height:18px; }
-
-/* the style of the div around each node */
-.ygtvitem { }
-
-/* the style of the div around each node's collection of children */
-.ygtvchildren { }
-* html .ygtvchildren { height:2%; }
-
-/* the style of the text label in ygTextNode */
-.ygtvlabel, .ygtvlabel:link, .ygtvlabel:visited, .ygtvlabel:hover {
- margin-left:2px;
- text-decoration: none;
- background-color: white; /* workaround for IE font smoothing bug */
-}
-
-.ygtvspacer { height: 10px; width: 10px; margin: 2px; }
+/*
+Copyright (c) 2008, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+version: 2.5.1
+*/
+/* first or middle sibling, no children */
+
+.ygtvtn {
+ width:16px; height:18px;
+ background: url(sprite-orig.gif) 0 -5600px no-repeat;
+}
+
+/* first or middle sibling, collapsable */
+.ygtvtm {
+ width:16px; height:18px;
+ cursor:pointer ;
+ background: url(sprite-orig.gif) 0 -4000px no-repeat;
+}
+
+/* first or middle sibling, collapsable, hover */
+.ygtvtmh {
+ width:16px; height:18px;
+ cursor:pointer ;
+ background: url(sprite-orig.gif) 0 -4800px no-repeat;
+}
+
+/* first or middle sibling, expandable */
+.ygtvtp {
+ width:16px; height:18px;
+ cursor:pointer ;
+ background: url(sprite-orig.gif) 0 -6400px no-repeat;
+}
+
+/* first or middle sibling, expandable, hover */
+.ygtvtph {
+ width:16px; height:18px;
+ cursor:pointer ;
+ background: url(sprite-orig.gif) 0 -7200px no-repeat;
+}
+
+/* last sibling, no children */
+.ygtvln {
+ width:16px; height:18px;
+ background: url(sprite-orig.gif) 0 -1600px no-repeat;
+}
+
+/* Last sibling, collapsable */
+.ygtvlm {
+ width:16px; height:18px;
+ cursor:pointer ;
+ background: url(sprite-orig.gif) 0 0px no-repeat;
+}
+
+/* Last sibling, collapsable, hover */
+.ygtvlmh {
+ width:16px; height:18px;
+ cursor:pointer ;
+ background: url(sprite-orig.gif) 0 -800px no-repeat;
+}
+
+/* Last sibling, expandable */
+.ygtvlp {
+ width:16px; height:18px;
+ cursor:pointer ;
+ background: url(sprite-orig.gif) 0 -2400px no-repeat;
+}
+
+/* Last sibling, expandable, hover */
+.ygtvlph {
+ width:16px; height:18px; cursor:pointer ;
+ background: url(sprite-orig.gif) 0 -3200px no-repeat;
+}
+
+/* Loading icon */
+.ygtvloading {
+ width:16px; height:18px; cursor:pointer ;
+ background: url(treeview-loading.gif) 0 0 no-repeat;
+}
+
+/* the style for the empty cells that are used for rendering the depth
+ * of the node */
+.ygtvdepthcell {
+ width:16px; height:18px;
+ background: url(sprite-orig.gif) 0 -8000px no-repeat;
+}
+
+.ygtvblankdepthcell { width:16px; height:18px; }
+
+/* the style of the div around each node */
+.ygtvitem { }
+
+/* the style of the div around each node's collection of children */
+.ygtvchildren { }
+* html .ygtvchildren { height:2%; }
+
+/* the style of the text label in ygTextNode */
+.ygtvlabel, .ygtvlabel:link, .ygtvlabel:visited, .ygtvlabel:hover {
+ margin-left:2px;
+ text-decoration: none;
+ background-color: white; /* workaround for IE font smoothing bug */
+}
+
+.ygtvspacer { height: 10px; width: 10px; margin: 2px; }
diff --git a/assets/tree.css b/assets/tree.css
index 334236d3..c712c1b5 100755
--- a/assets/tree.css
+++ b/assets/tree.css
@@ -1,103 +1,103 @@
-/*
-Copyright (c) 2006, Yahoo! Inc. All rights reserved.
-Code licensed under the BSD License:
-http://developer.yahoo.com/yui/license.txt
-Version: 0.11.3
-*/
-
-/* first or middle sibling, no children */
-.ygtvtn {
- width:16px; height:18px;
- background: url('yui/build/treeview/assets/tn.gif') 0 0 no-repeat;
-}
-
-/* first or middle sibling, collapsable */
-.ygtvtm {
- width:16px; height:18px;
- cursor:pointer ;
- background: url('yui/build/treeview/assets/tm.gif') 0 0 no-repeat;
-}
-
-/* first or middle sibling, collapsable, hover */
-.ygtvtmh {
- width:16px; height:18px;
- cursor:pointer ;
- background: url('yui/build/treeview/assets/tmh.gif') 0 0 no-repeat;
-}
-
-/* first or middle sibling, expandable */
-.ygtvtp {
- width:16px; height:18px;
- cursor:pointer ;
- background: url('yui/build/treeview/assets/tp.gif') 0 0 no-repeat;
-}
-
-/* first or middle sibling, expandable, hover */
-.ygtvtph {
- width:16px; height:18px;
- cursor:pointer ;
- background: url('yui/build/treeview/assets/tph.gif') 0 0 no-repeat;
-}
-
-/* last sibling, no children */
-.ygtvln {
- width:16px; height:18px;
- background: url('yui/build/treeview/assets/ln.gif') 0 0 no-repeat;
-}
-
-/* Last sibling, collapsable */
-.ygtvlm {
- width:16px; height:18px;
- cursor:pointer ;
- background: url('yui/build/treeview/assets/lm.gif') 0 0 no-repeat;
-}
-
-/* Last sibling, collapsable, hover */
-.ygtvlmh {
- width:16px; height:18px;
- cursor:pointer ;
- background: url('yui/build/treeview/assets/lmh.gif') 0 0 no-repeat;
-}
-
-/* Last sibling, expandable */
-.ygtvlp {
- width:16px; height:18px;
- cursor:pointer ;
- background: url('yui/build/treeview/assets/lp.gif') 0 0 no-repeat;
-}
-
-/* Last sibling, expandable, hover */
-.ygtvlph {
- width:16px; height:18px; cursor:pointer ;
- background: url('yui/build/treeview/assets/lph.gif') 0 0 no-repeat;
-}
-
-/* Loading icon */
-.ygtvloading {
- width:16px; height:18px;
- background: url('yui/build/treeview/assets/loading.gif') 0 0 no-repeat;
-}
-
-/* the style for the empty cells that are used for rendering the depth
- * of the node */
-.ygtvdepthcell {
- width:16px; height:18px;
- background: url('yui/build/treeview/assets/vline.gif') 0 0 no-repeat;
-}
-
-.ygtvblankdepthcell { width:16px; height:18px; }
-
-/* the style of the div around each node */
-.ygtvitem { }
-
-/* the style of the div around each node's collection of children */
-.ygtvchildren { }
-* html .ygtvchildren { height:2%; }
-
-/* the style of the text label in ygTextNode */
-.ygtvlabel, .ygtvlabel:link, .ygtvlabel:visited, .ygtvlabel:hover {
- margin-left:2px;
- text-decoration: none;
-}
-
-.ygtvspacer { height: 10px; width: 10px; margin: 2px; }
+/*
+Copyright (c) 2006, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.com/yui/license.txt
+Version: 0.11.3
+*/
+
+/* first or middle sibling, no children */
+.ygtvtn {
+ width:16px; height:18px;
+ background: url('yui/build/treeview/assets/tn.gif') 0 0 no-repeat;
+}
+
+/* first or middle sibling, collapsable */
+.ygtvtm {
+ width:16px; height:18px;
+ cursor:pointer ;
+ background: url('yui/build/treeview/assets/tm.gif') 0 0 no-repeat;
+}
+
+/* first or middle sibling, collapsable, hover */
+.ygtvtmh {
+ width:16px; height:18px;
+ cursor:pointer ;
+ background: url('yui/build/treeview/assets/tmh.gif') 0 0 no-repeat;
+}
+
+/* first or middle sibling, expandable */
+.ygtvtp {
+ width:16px; height:18px;
+ cursor:pointer ;
+ background: url('yui/build/treeview/assets/tp.gif') 0 0 no-repeat;
+}
+
+/* first or middle sibling, expandable, hover */
+.ygtvtph {
+ width:16px; height:18px;
+ cursor:pointer ;
+ background: url('yui/build/treeview/assets/tph.gif') 0 0 no-repeat;
+}
+
+/* last sibling, no children */
+.ygtvln {
+ width:16px; height:18px;
+ background: url('yui/build/treeview/assets/ln.gif') 0 0 no-repeat;
+}
+
+/* Last sibling, collapsable */
+.ygtvlm {
+ width:16px; height:18px;
+ cursor:pointer ;
+ background: url('yui/build/treeview/assets/lm.gif') 0 0 no-repeat;
+}
+
+/* Last sibling, collapsable, hover */
+.ygtvlmh {
+ width:16px; height:18px;
+ cursor:pointer ;
+ background: url('yui/build/treeview/assets/lmh.gif') 0 0 no-repeat;
+}
+
+/* Last sibling, expandable */
+.ygtvlp {
+ width:16px; height:18px;
+ cursor:pointer ;
+ background: url('yui/build/treeview/assets/lp.gif') 0 0 no-repeat;
+}
+
+/* Last sibling, expandable, hover */
+.ygtvlph {
+ width:16px; height:18px; cursor:pointer ;
+ background: url('yui/build/treeview/assets/lph.gif') 0 0 no-repeat;
+}
+
+/* Loading icon */
+.ygtvloading {
+ width:16px; height:18px;
+ background: url('yui/build/treeview/assets/loading.gif') 0 0 no-repeat;
+}
+
+/* the style for the empty cells that are used for rendering the depth
+ * of the node */
+.ygtvdepthcell {
+ width:16px; height:18px;
+ background: url('yui/build/treeview/assets/vline.gif') 0 0 no-repeat;
+}
+
+.ygtvblankdepthcell { width:16px; height:18px; }
+
+/* the style of the div around each node */
+.ygtvitem { }
+
+/* the style of the div around each node's collection of children */
+.ygtvchildren { }
+* html .ygtvchildren { height:2%; }
+
+/* the style of the text label in ygTextNode */
+.ygtvlabel, .ygtvlabel:link, .ygtvlabel:visited, .ygtvlabel:hover {
+ margin-left:2px;
+ text-decoration: none;
+}
+
+.ygtvspacer { height: 10px; width: 10px; margin: 2px; }
diff --git a/help/admin.htm b/help/admin.htm
index 03448e29..4d90b690 100755
--- a/help/admin.htm
+++ b/help/admin.htm
@@ -1 +1 @@
-
i2b2 Administration
Welcome to the i2b2 Administration module of the project management interface.
The pages within i2b2 Admin are designed to assist with workflow and overall ease of use, individuals can easily save data and parameters for the hive, projects and users.
Manage Hive
View domain information and capture cell data and global parameters.
Manage Project
General information about the project as well as project specific cell data, parameters, and user access and roles.
Manage Users
General information about a user.
Manage Approvals
Captures general information used to authorize projects.
Project Requests
View information about submitted project requests.
The navigation bar on the left side of the page can be used to access individual pages.
1.You will see a login screen. Log in with a user you know has ADMIN role.
For those installing for the first time, use the default ADMIN user of ‘i2b2’ and password of ‘demouser’.
2.Once logged on you will be presented with the admin setup page. You should see the following:
3.Click the ‘Hive” in the PM Navigation. This is where you can modify the domain, cells and global parameters. Click on ‘Domain’ to see the domain information.
Navigation Bar
A navigation bar will remain on the left side of all the pages. This can be used if a user wants to quickly access a particular page.
Figure 1 Navigation Bar
Pages
Individual pages will be used to capture information throughout the project management module. These pages will be specific to the data that is collected.
Page Heading
At the top of each page will be a tab that contains the name of the page and its location.
In the example shown below, the heading tells us the user is on the projectparameters page for the “demo” project.
Figure 2 Page Heading
Setup
To assist with workflow and overall ease of use, individuals will now be able to easily save data and parameters for the hive, projects and users. An outline of what can be stored in the PM database and the related functionality is listed below.
Global Setup
In i2b2 Project Management, global data refers to information that is not specific to any one hive, project, or user. The information setup here is used by all.
Global Parameters
■Parameters that are to be used by all hives and projects will be defined in the global parameters page.
■The data will be stored in the PM_GLOBAL_PARAMS table.
Figure 3 Global Parameters Page
Users Setup
In order to use the i2b2 application a user has to be setup in project management and given access to one or many projects. In addition, variables can be setup for a user that can be used across multiple projects or specific to one project.
User Data
■General information about the user will be stored in the PM_USER_DATA table.
■The user_id will be referenced in other tables such as PM_USER_PARAMS and PM_PROJECT_USER_ROLES.
Figure 4 User Data Page
User Parameters
■Parameters entered here are specific to the user and are not specific to any one project.
■The information will be stored in the PM_USER_PARAMS table.
Figure 5 User Parameters Section
User Project Roles
■The project user page captures information regarding which users have access to the project and their role.
■The information will be stored in the PM_PROJECT_USER_ROLES table.
●Detailed information about user roles can be found in the project section of this document.
Hive Setup
Hive Data
■The domain page captures general information about the hive.
■Information captured includes the domain id, domain name, environment, and help URL.
■The information will be stored in the PM_HIVE_DATA table.
Figure 6 Hive Data (Domain) Page
Hive Parameters
■Parameters entered here are specific to the hive (domain) and are not specific to any one project or user.
■The hive parameters can be added from the hive (domain) data page. Once you click on the domain an additional section for entering the parameters will appear at the bottom of the page.
■The information will be stored in the PM_HIVE_PARAMS table.
Figure 7 Hive Parameters Section
Cell Data
■The cell data page captures information and registers the cells associated to the hive.
■The information will be stored in the PM_CELL_DATA table.
Figure 8 Cells Data Page
Cell Parameters
■Parameters entered here are specific to the cell and are not specific to any one project or user.
■The cell parameters can be added from the cell data page. Once you click on a cell an additional section for entering the parameters will appear at the bottom of the page.
■The information will be stored in the PM_CELL_PARAMS table.
Figure 9 Cell Parameters Section
Project Setup
A hive can have multiple projects setup.
Project Data
■The project data page captures general information about the project.
■The information will be stored in the PM_PROJECT_DATA table.
Figure 10 Project Data Page
Project Parameters
■Parameters entered here are specific to the project.
■The project parameters can be added from the project parameters page.
■The information will be stored in the PM_PROJECT_PARAMS table.
Figure 11 Project Parameters Page
Project Users
■The project users’ page captures information regarding which users have access to the project and their role. (see the next section for detailed information regarding roles)
■The information will be stored in the PM_PROJECT_USER_ROLES table.
Figure 12 Project Users Page
Project User Roles
Each user will have at least two roles per user_id and product_id combination. These two roles can be further defined as a Data Protection role and a Hive Management role.
The data protection role/path establishes the detail of data the user can see while the hive management role/path defines their level of functionality the user has in a project.
Data Protection Track
Role
Access Description
DATA_OBFSC
OBFSC = Obfuscated
The user can see aggregated results that are obfuscated (example: patient count).
The user is limited on the number of times they can run the same query within a specified time period. If the user exceeds the maximum number of times then their account will be locked and only the Admin user can unlock it.
DATA_AGG
AGG = Aggregated
The user can see aggregated results like the patient count.
The results are not obfuscated and the user is not limited to the number of times they can run the same query.
DATA_LDS
LDS = Limited Data Set
The user can see all fields except for those that are encrypted.
An example of an encrypted field is the blob fields in the fact and dimensiontables.
DATA_DEID
DEID = De-identified Data
The user can see all fields including those that are encrypted.
An example of an encrypted field is the blob fields in the fact and dimensiontables.
DATA_PROT
PROT = Protected
The user can see all data, including the identified data that resides in the Identity Management Cell.
Hive Management Track
Role
Access Description
USER
Can create queries and access them if he/she is the owner of the query.
MANAGER
Can create queries and can access queries created by different users within the project.
ADMIN
Can see anything in the Hive except identified data.
●Additional roles can be added to the PM_PROJECT_USER_ROLES table but there will not be any recognized hierarchy to those roles.
Project User Parameters
■Parameters entered here are specific to the user and the project.
■The project’s user parameters can be added from the project users’ page. Once you click on a project an additional section for entering the user parameters will appear at the bottom of the page.
■The information will be stored in the PM_PROJECT_USER_PARAMS table.
Figure 13 Project Users Parameters Section
+
i2b2 Administration
Welcome to the i2b2 Administration module of the project management interface.
The pages within i2b2 Admin are designed to assist with workflow and overall ease of use, individuals can easily save data and parameters for the hive, projects and users.
Manage Hive
View domain information and capture cell data and global parameters.
Manage Project
General information about the project as well as project specific cell data, parameters, and user access and roles.
Manage Users
General information about a user.
Manage Approvals
Captures general information used to authorize projects.
Project Requests
View information about submitted project requests.
The navigation bar on the left side of the page can be used to access individual pages.
1.You will see a login screen. Log in with a user you know has ADMIN role.
For those installing for the first time, use the default ADMIN user of ‘i2b2’ and password of ‘demouser’.
2.Once logged on you will be presented with the admin setup page. You should see the following:
3.Click the ‘Hive” in the PM Navigation. This is where you can modify the domain, cells and global parameters. Click on ‘Domain’ to see the domain information.
Navigation Bar
A navigation bar will remain on the left side of all the pages. This can be used if a user wants to quickly access a particular page.
Figure 1 Navigation Bar
Pages
Individual pages will be used to capture information throughout the project management module. These pages will be specific to the data that is collected.
Page Heading
At the top of each page will be a tab that contains the name of the page and its location.
In the example shown below, the heading tells us the user is on the projectparameters page for the “demo” project.
Figure 2 Page Heading
Setup
To assist with workflow and overall ease of use, individuals will now be able to easily save data and parameters for the hive, projects and users. An outline of what can be stored in the PM database and the related functionality is listed below.
Global Setup
In i2b2 Project Management, global data refers to information that is not specific to any one hive, project, or user. The information setup here is used by all.
Global Parameters
■Parameters that are to be used by all hives and projects will be defined in the global parameters page.
■The data will be stored in the PM_GLOBAL_PARAMS table.
Figure 3 Global Parameters Page
Users Setup
In order to use the i2b2 application a user has to be setup in project management and given access to one or many projects. In addition, variables can be setup for a user that can be used across multiple projects or specific to one project.
User Data
■General information about the user will be stored in the PM_USER_DATA table.
■The user_id will be referenced in other tables such as PM_USER_PARAMS and PM_PROJECT_USER_ROLES.
Figure 4 User Data Page
User Parameters
■Parameters entered here are specific to the user and are not specific to any one project.
■The information will be stored in the PM_USER_PARAMS table.
Figure 5 User Parameters Section
User Project Roles
■The project user page captures information regarding which users have access to the project and their role.
■The information will be stored in the PM_PROJECT_USER_ROLES table.
●Detailed information about user roles can be found in the project section of this document.
Hive Setup
Hive Data
■The domain page captures general information about the hive.
■Information captured includes the domain id, domain name, environment, and help URL.
■The information will be stored in the PM_HIVE_DATA table.
Figure 6 Hive Data (Domain) Page
Hive Parameters
■Parameters entered here are specific to the hive (domain) and are not specific to any one project or user.
■The hive parameters can be added from the hive (domain) data page. Once you click on the domain an additional section for entering the parameters will appear at the bottom of the page.
■The information will be stored in the PM_HIVE_PARAMS table.
Figure 7 Hive Parameters Section
Cell Data
■The cell data page captures information and registers the cells associated to the hive.
■The information will be stored in the PM_CELL_DATA table.
Figure 8 Cells Data Page
Cell Parameters
■Parameters entered here are specific to the cell and are not specific to any one project or user.
■The cell parameters can be added from the cell data page. Once you click on a cell an additional section for entering the parameters will appear at the bottom of the page.
■The information will be stored in the PM_CELL_PARAMS table.
Figure 9 Cell Parameters Section
Project Setup
A hive can have multiple projects setup.
Project Data
■The project data page captures general information about the project.
■The information will be stored in the PM_PROJECT_DATA table.
Figure 10 Project Data Page
Project Parameters
■Parameters entered here are specific to the project.
■The project parameters can be added from the project parameters page.
■The information will be stored in the PM_PROJECT_PARAMS table.
Figure 11 Project Parameters Page
Project Users
■The project users’ page captures information regarding which users have access to the project and their role. (see the next section for detailed information regarding roles)
■The information will be stored in the PM_PROJECT_USER_ROLES table.
Figure 12 Project Users Page
Project User Roles
Each user will have at least two roles per user_id and product_id combination. These two roles can be further defined as a Data Protection role and a Hive Management role.
The data protection role/path establishes the detail of data the user can see while the hive management role/path defines their level of functionality the user has in a project.
Data Protection Track
Role
Access Description
DATA_OBFSC
OBFSC = Obfuscated
The user can see aggregated results that are obfuscated (example: patient count).
The user is limited on the number of times they can run the same query within a specified time period. If the user exceeds the maximum number of times then their account will be locked and only the Admin user can unlock it.
DATA_AGG
AGG = Aggregated
The user can see aggregated results like the patient count.
The results are not obfuscated and the user is not limited to the number of times they can run the same query.
DATA_LDS
LDS = Limited Data Set
The user can see all fields except for those that are encrypted.
An example of an encrypted field is the blob fields in the fact and dimensiontables.
DATA_DEID
DEID = De-identified Data
The user can see all fields including those that are encrypted.
An example of an encrypted field is the blob fields in the fact and dimensiontables.
DATA_PROT
PROT = Protected
The user can see all data, including the identified data that resides in the Identity Management Cell.
Hive Management Track
Role
Access Description
USER
Can create queries and access them if he/she is the owner of the query.
MANAGER
Can create queries and can access queries created by different users within the project.
ADMIN
Can see anything in the Hive except identified data.
●Additional roles can be added to the PM_PROJECT_USER_ROLES table but there will not be any recognized hierarchy to those roles.
Project User Parameters
■Parameters entered here are specific to the user and the project.
■The project’s user parameters can be added from the project users’ page. Once you click on a project an additional section for entering the user parameters will appear at the bottom of the page.
■The information will be stored in the PM_PROJECT_USER_PARAMS table.
The Temporal Query Tool view extends the query functionalities
- provided by the classic Query Tool view. Users can submit temporal queries to using
- the Temporal Query Tool view.
-
-
i2b2 Temporal Query Tool View
-
-
The Temporal Query Tool view extends the query
- functionalities provided by the classic Query Tool view. Users can create and
- submit temporal queries to using the Temporal Query Tool view. It submits a
- "select query" that will retrieve information from the database associated to the
- i2b2 Web Client.
The interface is organized to facilitate the temporal querying
- process. There are three main steps in the process: Defining a population, defining
- temporal relationships, and reviewing and submitting query. The interface is designed
- to take users through each of these three steps. The section below describes the
- interface for each step in detail.
The image below shows the starting point of the Temporal
- Query Tool view interface along with its annotations. Users would interact with
- the Group Panels to define a population they are interested in. In the next
- step, users would define the temporal relationships they are interested in. Finally,
- users would review and submit their queries in the third step. This section breaks
- down the interface for the 1st step.
-
-
-
-
The Patient/Encounter Dropdown Box allows users to
- choose whether to define the population of the query using patients or encounters.
- The default is Patient:
-
-
-
-
Creating a population is optional. Users can skip Step 1 to use all data in the database.
At the start up, the interface for Step 1 displays three
- groups by default. Each of the groups contains several components. In general, all
- areas bounded by an orange-yellow highlight are clickable.
-
-
-
- (Group Heading) The heading is a label to easily identify the collection of terms.
- Each heading will contain "Group" followed by a sequential number.
Example: Group 1, Group 2, Group 3, etc.
-
-
- (Selection Criteria) This area of the panel is used to define date selections and other constraints.
-
-
- (Panel Timing) The panel timing defines the constraint on the panel level and uses the patient's visits in determining eligibility.
-
-
- (Group List) This section contains the terms that will be used during the process of querying the database.
-
-
- (Delete Group) Clicking on this button will remove the group from the
- query construction. Users should use it to quickly discard a group.
-
-
- (Information Box) The content in the information box will change depending on whether or not a term is listed in the panel / group.
-
-
No term(s) listed
-
-
The message will appear as "drop a term on here"
-
The color of the box will be yellow
-
-
-
Term(s) listed
-
-
The message will appear as "one or more of these"
-
The color of the box will be green
-
An additional information box will appear between panels
A previous query saved in Workplace view or in the
- Previous Query view can be dragged and dropped here to reload the query.
- Reloading a query will overwrite the current query information. If the previous query
- is a temporal query, its population and temporal relationships will all be loaded. If
- the previous query is a non-temporal query, only the population portion of the
- temporal query interface will be loaded since a non-temporal query has no temporal
- relationship information.
Step 2:Define Temporal Relationships is used to
- define temporal relationships. It allows users to create a list of Events and
- a list of Temporal Relationships. Users define a list of interested
- Events and also define Temporal Relationships to describe how the
- events are related temporally, e.g. Event A must occur before Event B.
-
-
The interface is therefore a bit more complicated than Step 1
- presented in the earlier section. It is broken into two major parts, presented below.
- On the left are the Event in Query panel and the Show Population panel.
- The Event in Query panel lets users define a list of Events. The Show
- Population panel allows users see and change the population definition originally
- defined in Step 1. On the right is a panel allowing users to add, remove, or modify
- relationships among the events.
The Events in Query Panel allows users to add, remove, and
- edit each Event. Each Event is represented by an Event Panel. An
- Event consists of a list of Groups just like a population definition. Users
- can add, remove, and edit each of the Groups in an Event by dragging
- terms into a group, changing its constraints, etc. At startup, two empty
- Events are added, each with a Group. More Events can be added by
- clicking on the Add Event button.
-
-
One difference between an Event and a set of
- Groups in Step 1 is that the first Group in an Event is special.
- It cannot be removed (note the missing Remove Group button), and its Group
- BindingControl is missing. The Group Binding for the 1st
- Group of every Event is not changeable. All other Group's
- Group Bindings are changeable. The first group anchors all other groups in an
- Event. That is, the first Group determines the timing of the enclosing
- Event with respect to the other Events temporally in the query.
-
-
Under the list of Events is the gray background, which serves
- as a Query Drop Area. Users can drop previous query in the Query Drop
- Area to overwrite the current query. It has the same effect as the Query Drop
- Area in Step 1.
-
-
An Event Panel has several components.
-
-
-
-
-
- (Event ID) This area shows the Event's name and color. Clicking on this area
- will expand/collapse the entire Event. When an Event Panel is
- collapsed, all its Groups are hidden. Only a row that contains the Event
- ID area is shown. Click on the Event ID area to expand the Event.
- All Events are expanded when created. Color of an Event is assigned
- only when at least one term has been added to it.
-
-
-
(Event-Wide Date
- Constraints) Selecting this area allows users to specify date constraints for all
- Groups in this Event. This serves a similar function as the
- supplemental Query-wide Date Constraints Control Panel in the Step 1.
-
-
(Remove Event Button)
- Clicking this button will remove the Event, deleting all its content and
- removing it from view.
-
-
(Group Panel) The Group
- Panel is the same as the ones in Step 1.
-
-
(Add Group Button)
- Clicking on it adds a new Group to the Event.
-
-
-
-
-
The population in Step 1 is shown. The title changes to "Edit
- Population," and every component is editable just as they are in Step 1.
On the right hand side of the Step 3 interface is where users
- can define how Events are related to one another temporally. The Temporal
- Relationship Definition Panel contains a list of Temporal Relationship
- Panels and an Add Temporal Relationship Button. These components are
- described in detail below.
-
-
Please note that at least one Temporal Relationship
- Panel must be filled before users can move on to Step 3. A Temporal
- Relationship Panel is filled only if has a fulfilled Event in the Top Event
- Definition dropdown box and a fulfilled Event in the Bottom Event
- Definition dropdown box (see the image below). A fulfilled Event is one that has
- at least a fulfilled Group. A fulfilled Group is one that contains at
- least one term (not empty).
-
-
-
-
-
- The color indicator shows the colors of the Events
- that are being referenced in the Temporal Relationship. The top color (green
- in this example) matches the color of the Event in the Top Event
- Definition row and the bottom color (orange) matches the color of the
- Event in the Bottom Event Definition row. If an Event that has
- no content is referred, no color will be displayed in the Color Indicator.
-
-
- (Top Event Definition)This row allows users designate the first Event
- in this Temporal Relationship. A second event is specified in the Bottom
- Event Definition row. The dropdown boxes have the following choices:
-
-
(Dropdown box options for Event Definition)
-
-
-
- (Event Ordering) This dropdown box describes how the Top Event elates
- to the Bottom Event.
-
-
(Dropdown box options for Event Ordering)
-
-
- (Bottom Event Definition) This row allows users designate the second
- Event in this Temporal Relationship. It has the same dropdown box
- options as Top Event Definition.
-
-
- (Occurrence Temporal Constraint) Users can optionally describe the specified
- Event Ordering by a time range, creating the bolded part of, for example,
- "Event 1 Occurs Before Event 2 By > 5 day(s)." This additional temporal
- constraint can be a bounded range such as "By > 5 day(s) And < 10
- day(s)." Users must first check the "By" checkbox to enable the dropdown
- boxes on that row. The "And" checkbox becomes enabled only when the
- "By" checkbox is checked. Checking the "And" checkbox enables the
- dropdown boxes on its row. Both the By row and the And row have the
- same options depicted below.
-
-
- (Options for Occurrence Temporal Constraint)
-
-
-
-
- (Add Temporal Relationship Button) This adds a new Temporal Relationship Panel
- should users require more relationship constraints among Events.
-
The last step allows users to review and modify the name of
- the query and selection of analyses types they want the server to return as the
- results of the query.
Upon entering Step 3, a query name is automatically generated.
- A "(t)" prefix indicates the query is a temporal query, differentiating it from
- normal queries submitted using the classic query tool. Some terms used in the query
- are then appended to identify this query. A timestamp is added at the end. Users may
- modify the query name however they wish. The name in the Query Name Area will
- be displayed in the Previous Query view once the query is submitted
The area presents the different analyses types users can
- select as results of the query. They are exactly the same as the ones from the
- classic Query Tool:
-
-
-
-
-
- Table of Result Types
-
-
-
-
-
- Patient list
-
-
-
- Provides a set of patients who met the search criteria.
-
-
-
-
-
- Event list
-
-
-
- Provides a set of encounters for those patients who met
- the search criteria.
-
-
-
-
-
- Number of patients
-
-
-
- Provides the total number of patients who met the
- search criteria.
-
-
-
-
-
- Gender patient breakdown
-
-
-
- Provides a breakdown of the patients by their gender.
-
-
-
-
-
- Vital Status patient breakdown
-
-
-
- Provides a breakdown of the patients by their vital
- status.
-
-
-
-
-
- Race patient breakdown
-
-
-
- Provides a breakdown of the patients by their race.
-
-
-
-
-
- Age patient breakdown
-
-
-
- Provides a breakdown of the patients by their age
-
-
-
-
-
- Timeline
-
-
-
- Provides a set of patients who met the defined criteria
- and automatically generates a timeline in the timeline view.
-
-
-
-
-
-
By default Number of patients and Timeline are selected.
In Step 3, the Footer is different. Instead of another "Next"
- button, a Submit Query Button is there instead. It allows users to execute the
- query they have built in Step 1 and Step 2.
-
-
After pressing Submit Query, the button will become inactive
- to prevent inadvertent submission. A "Processing..." text will display to indicate
- that the query is being sent to the server for processing. The red rectangular button
- allows users to cancel the query submission.
-
-
-
-
When the server completes the processing, the number of patients found will be returned:
-
-
-
-
If the query takes too long, a message will be
- displayed instead, in addition, the Submit Query Button will become available
- again. Users are advised to monitor the Previous Queries view to see when the
- query finishes.
-
-
-
-
-
NOTE:
-
- The result types that appear will depend on what you have selected when running the query..
-
Many of the UI elements discussed above are for display only.
- That is, they display the content of a Group or an Event or a Query, but they do not
- themselves allow editing of the values. Instead, users have to click on display
- components to launch an editor. The various editors are presented here.
-
-
This dialogs are all modal. That means no other actions can be
- performed when the dialog is launched. Users must first dismiss (typically by either
- selecting OK or Cancel) the dialog before other UI elements in the Web Client can be
- interacted with.
-
-
The dialogs can be moved by dragging the blue title area
- around, and they usually appear where the mouse pointer is when launched.
-
-
-
- (Date Constraint Editor) The Date Constraint Editor is launched when
- user clicks on a Date Constraint Control in every Group Panel, in the
- title area of an Event, in the Supplemental Control Panel in Step 1,
- and in the View Population Panel in Step 2.
-
-
The editor starts up as the left-most figure below. Clicking
- on either of the orange-yellow-highlighted textboxes will launch a calendar widget
- for users to select the start (middle figure) or the end date (right-most figure).
- When finished, users should click on the OK button in the gray footer area to
- accept the constraints. Alternatively, clicking the Cancel button will leave
- the original date constraints unmodified.
-
-
The start and end date constraints are both inclusive. That is
- if the start date is January 1, 1999, and the end date is December 31, 1999, the
- range of the constraint spans from 1/1/1999 00:00:00.000 to 12/31/1999
- 23:59:59.999.
-
-
-
-
-
- (Group Binding Editor) The Group Binding Editor is found in every
- Group Panel. It lets users change the binding for that Group. The left
- figure depicts the initial appearance when a Group Binding Editor is launched.
- It consists of three rows, each represent a binding option. The last option
- (Bound-by-Observation) is only available as a choice if a modifier is dropped
- in the Group. Selecting one of the radio buttons and clicking on OK
- will set the new binding. Cancel will cancel the operation and leave the
- original binding unmodified.
-
-
-
-
-
- (Occurrence Count Constraint Editor) This editor can be launched in every
- Group by clicking on its Count Control area. Users can specify how many (or
- few) times the terms in a Group must occur. The editor itself is simple: a
- dropdown box specifies the type of operator and a spinner allowing for a number to be
- specified.
-
-
The left figure shows the dialog at startup, and the right
- figure shows all the operator options.
-
-
-
-
-
- (Value Editor) When users drop an ontology term that can be further
- constrained by values into a Group, a Value Editor will automatically
- launch. Users can use this editor to select a way to constrain the value of the term
- and specify what values to constrain the term by. If a term that supports values
- already exists in a Group, users can right click on the term and select
- "Edit Value..." to launch the Value Editor for that term. Please note
- that some Modifiers do not support values (e.g. Circulatory Systems [Primary
- diagnosis]).
-
-
(Right click on a term that supports value
- constraints to launch the Value Editor)
-
-
Note that the constraint is optional. The default constraint
- put on these terms is "No Value," and by closing the dialog immediately, users
- can quickly accept the default constraint. Please note that closing the dialog does
- not cancel the value editing operation, it instead accepts the values that are
- currently set.
-
-
If multiple terms were dropped at the same time, all terms
- that support value constraints in the same drop will appear in a list the left side
- of dialog. Users can select the terms on the list to view and edit its value
- constraint. Alternatively, users can use the navigation buttons "Previous",
- "Next" to navigate. Finally, to finish, users should select the last term on
- the list and click on "Finish."
-
-
(The Value Editor
- shows two terms on its list on the left. The right half shows the currently set value constraints for the selected
- term on list. The default is "No Value." Users can also navigate the list by using
- the "Next" "Previous" buttons on the bottom of the right half. When
- finished, click on the "Finish" button or simply close the dialog.)
-
-
Different terms support different kinds of value constraint,
- some are constrained by text, some by numeric value, some by a list of pre-arranged
- values, and some by abnormal flags. For example, the Color term supports abnormal
- flags and a list of pre-arranged values. These options are shown on the right half of
- the dialog. By selecting the radio buttons, users can choose the kind of constraint
- they want. Here are the screen shots of the right half of the dialog when radio
- buttons other than "No Value" are chosen for the term Color.
-
-
-
-
-
-
Creating a Query
-
-
This section describes the process of adding items to the
- query tool, "AND" / "OR" operators and setting constraints.
In order to create your query, you will need to define what
- information will be retrieved from the databases. Selected items from other i2b2
- Web Client views can be dragged and dropped (copied) into the TemporalQuery
- Tool view.
-
-
-
-
Concepts
-
-
Concepts() can be defined as terms,
- results, providers, etc. They can be added as a group (folder ()) or
- individually by dragging the item(s) from Navigate Terms, Find Terms,
- and Workplace views.
-
-
-
Modifiers
-
-
Modifiers()
- are associated with a concept or group of concepts. They can be added as a group (modifier folder
- ()) or
- individually by dragging the item(s) from Navigate Terms, Find Terms, and Workplace views.
-
-
-
Previous Query
-
-
A new query can be created from one that has already
- been run by dragging the previous query(
- or)
- from Previous Query and Workplace views.
-
-
-
- Patient List
-
-
A patient list()
- can be used in a query by dragging the item(s) from Previous Query and Workplace views.
-
-
-
Individual Patient
-
-
A patient () or several patients can be used in a
- query by dragging them from Previous Query view and Workplace views.
-
-
-
Event List
-
-
An event list()
- can be used in a query by dragging the item(s) from Previous Query and Workplace views.
-
-
Query Definition
-
-
A new query can be created from one that has already
- been run by dragging the query definition()
- from the Workplace view.
-
-
Group Template
-
-
Users can define a group of concepts that they
- frequently run and save them in their workplace view. This grouping of concepts is
- referred to as a group template().
-
-
A new query can be created using the group template
- by dragging the template from Workplace view to the Group Header.
There are two operators, known as SQL Logical
- Operators, which are necessary when running a query that has more than one term.
- These operators provide a way to specify exactly what users want to retrieve. The
- operators are the 'AND' and 'OR' operators.
-
-
The query tool knows which operator to use based on the panels
- used when defining the query. It is important to verify the users are setting up
- their query correctly as each operator will return different results.
Information in the Workplace is related to the most
- common concepts, modifiers, and queries that an individual uses and in essence
- becomes their personal workplace.
Information in the Workplace is related to the most
- common concepts, modifiers, and queries that an individual uses and in essence
- becomes their personal workplace.
A previous query can be used to run a new query or as
- an item within a query (query-in-query). To add a previous query to the Query Tool
- view simply drag the query name from one of the following views.
-
-
1. Previous Query view
-
-
2. Workplace view
-
-
Within the Query Tool view, the previous query can be added to one of the following two locations.
-
-
-
-
- Query Name field
-
-
-
- The item(s) and constraints from the original query will
- be used to create a new query. This information can be edited to make a new
- query or can be used as is to run the query again.
-
-
- Please note that the tool does not currently support
- dropping of a previous query of a previous query or a previous query of a temporal query.
-
-
-
-
-
- Panel (Group)
-
-
-
- Used within a new query (query-in-query). Add additional search criteria (items) to be used in the new query.
-
-
-
-
-
How to add a previous query from each of the views listed above is explained in the next few sections.
1. In the Previous Query view
- highlight the previous query() by clicking on its name
-
-
2. While holding the left mouse
- button down, drag the item over to the TemporalQuery Tool View.
-
-
3. Drop the previous query into the
- Query DropArea in either Step 1 or Step 2.
-
-
4. The terms, Groups,
- Events, and Temporal Relationships defined in that previous query will
- be reconstituted in the current interface. If the previous query is a non-temporal
- query, then only the Population portion of the UI will be reconstituted. If the
- previous query is a temporal query, then both the Population portion and the temporal
- relationship portion of the UI will be reconstituted.
Information in the workplace is related to the most
- common concepts, modifiers, and queries that an individual uses and in essence
- becomes their personal workplace.
1. In the Workplace view, expand
- the folder(s) that contains the previous query you want to add.
-
-
2. Highlight the previous query
- () by clicking on its name
-
-
3. While holding the left mouse
- button down, drag the item over to the Query Tool View.
-
-
4. Drop the previous query into the
- Query Drop Area in either Step 1 or Step 2.
-
-
5. The terms, Groups,
- Events, and Temporal Relationships defined in that previous query will
- be reconstituted in the current interface. If the previous query is a non-temporal
- query, then only the Population portion of the UI will be reconstituted. If the
- previous query is a temporal query, then both the Population portion and the temporal
- relationship portion of the UI will be reconstituted.
Information in the workplace is related to the most
- common concepts, modifiers, and queries that an individual uses and in essence
- becomes their personal workplace.
Information in the workplace is related to the most
- common concepts, modifiers, and queries that an individual uses and in essence
- becomes their personal workplace.
1. In the Workplace view, find
- the query definition you want to add.
-
-
-
-
2. Highlight the query
- definition() by clicking on its name
-
-
3. While holding the left mouse
- button down, drag the item over to the Query Tool View.
-
-
4. Drop the query definition into the
- Query Drop Area in Step 1 or Step 2.
-
-
5. The item(s) associated with the
- query definition will display in the appropriate group(s), the name of the query will
- appear at Query Name, and any constraints that were defined when the original
- query was run will now default with the new query.
Three Group Panels are displayed in Step 1 by default.
- In step 2, only one Group Panel is available per Event. Some complex
- queries may require the use of additional panels. Users may use the "Add Group"
- button to add more Groups.
-
-
1.
- Click on the Add Group button.
-
-
-
-
(Add Group button in Step 1)
-
-
2.
- A new panel is added with each click (two clicks are performed here to create a total
- of three Group Panels).
-
-
-
-
In Step 2, there is an "Add Group" button for each Event, and
- an additional one to add Group to the population. These "Add Group" button work
- exactly the same as the one described above.
Constraints are used to narrow down the search criteria to a
- particular time from, number of occurrences or a specific value or range of values.
- In i2b2, there are several types of constraints that can be defined in the Query Tool
- view.
-
-
-
-
- Constraint Type
-
-
-
- Description
-
-
-
-
-
- Group Binding (Panel Timing)
-
-
-
- Constraint is defined on the Group and utilizes the
- patient encounters and / or instance number when determining eligibility. There
- are three binding choices. The most general one is bound-by-patient, followed
- by bound-by-encounter, and finally, the strictest one is
- bound-by-observation.
-
-
-
-
-
- Date
-
-
-
- Constraint uses a date range when determining eligibility.
-
-
-
-
-
- Occurrence
-
-
-
- Constraint is by the number of occurrences an item is documented.
-
-
-
-
-
- Value
-
-
-
- Constraint is by the value associated to a concept or modifier. Not all items have values.
-
-
-
-
-
Note: In the
- client, the value constraints are currently the only ones that directly correspond to
- a single concept. All others are defined on the query or Group level.
Group binding constraints utilize the encounter/observation
- information along with the items defined to determine if a patient meets the search
- criteria.
-
-
Note that this is previously known as Panel Timing in the
- classic Query Tool. In the classic Query Tool, users can also specify
- Query Timing. In the Temporal Query Tool, Query Timing is automatically set by
- the choice of Group Bindings. That is, the strictest Group Binding dictates what the
- Query Timing is:
-
-
- if there is a
- Group that is "bound-by-observation," then the query timing will be
- "bound-by-observation" (or in the classical terminology, "same instance.")
-
-
- If there is a
- Group that is bound-by-encounter," but no Groups "bound-by-observation," then the
- query timing will be "bound-by-encounter," (or classically, "same encounter.")
-
-
- Otherwise the
- query timing is "bound-by-patient" ("treat independently.")
Group Binding sets the binding for each Group. Possible values
- are Bound-by-Patient, Bound-by-Encounter, and
- Bound-by-Observation. These constraints tell the query processor that these
- Groups describe the same patient, encounters or observation.
-
-
In step 1, the default binding for each Group changes
- depending on whether users are defining a Patient Population or an Encounter
- Population. If Patient Population is used, then Bound-by-Patient is the
- default, and it is unchangeable. If Encounter Population is used, then
- Bound-by-Encounter is the default. However, in this case, users can change
- each Group's binding to Bound-by-Patient if they so desire or to
- Bound-by-Observation if a modifier term is used in that Group.
-
-
Users can select one of three available options:
-
-
1.(Bound-by-Patient) The
- items (facts) can occur at any time in the patient's history.
-
-
2.(Bound-by-Encounter) The
- items (facts) occur during the same encounter (e.g. visit to hospital).
-
-
3.(Bound-by-Observation) The
- items (facts) occur during the same observation.
-
-
The values are hierarchical: a Group that is
- bound-by-observation is also bound-by-encounter and bound-by-patient. A group that is
- bound-by-encounter is also bound-by-patient. Every group is bound-by-patient.
-
-
The Group Binding for a Group can be set by launching
- the Group Binding Editor, by clicking on the highlighted area in a Group:
-
-
-
-
The Group Binding Editor consists of 3 rows, each representing
- a possible Group Binding value. Selecting one will set the value.
-
-
Users can also set the Group binding for all
- Groups using the Group Binding Control Panel in the Supplemental
- Control Panel in Step 1.
The items (facts) occur during the same encounter (e.g. visit to hospital).
-
-
-
-
Example:
-
-
Patient has a diagnosis of Acute MI documented at any time in their history and they have a medication with a dose greater
- than 500 mg and a medication that is taken once a day documented
- during the same encounter.
-
-
-
-
RESULTS: In our database, there are 4 patients who have
- had a medication with a dose greater than 500 mg and a frequency of once a day
- entered as a fact in the observation_fact table, where the medication dose and
- frequency have the sameencounter_numAND the
- diagnosis of acute MI, the medication dose and frequency all have the samepatient_num.
The items (facts) listed in the panel occur during the same observation of a visit.
-
-
Example:
-
-
Patient has a diagnosis of Acute MI documented at any
- time in their history and they have a medication with a dose greater
- than 500 mg and a medication that is taken once a day documented
- during the same instance.
-
-
-
-
RESULTS: In our database, there are 3 patients who
- have had a medication with a dose greater than 500 mg and a frequency of once a
- day entered as a fact in the observation_fact table, where the medication dose
- and frequency have the sameencounter_numANDinstance_num
- AND the diagnosis of acute MI, the medication dose and frequency all
- have the samepatient_num.
Users can define a date range to be used when querying the
- database. This date range can be in any one of the following combinations. Note that
- all start and end dates are inclusive.
Only data with activity within the defined date range will be used.
-
-
Example:
-
-
-
-
Concept: Acute Myocardial Infarction
-
-
From date: 01/01/2001
-
-
To date: 12/31/2005
-
-
In this example, if a patient has a diagnosis of
- Acute Myocardial Infarction (MI) entered on the record from 01/01/2001 to 12/31/2005
- then their data will be included. If the patient does have an MI diagnosis but it was
- entered prior to 01/01/2001 or after 12/31/2005 then their information will not be
- included.
Data from the defined start date to the latest date available. No end date defined.
-
-
Example:
-
-
-
-
Concept: Acute Myocardial Infarction
-
-
From date: 01/01/2001
-
-
To date:
-
-
In this example, if a patient has a diagnosis of
- Acute Myocardial Infarction (MI) entered on the record any time on or after
- 01/01/2001 will be included. If the diagnosis was entered prior to 01/01/2001 then
- the data will not be included.
All data up until the defined end date. No start date
- defined.
-
-
Example:
-
-
-
-
Concept: Acute Myocardial Infarction
-
-
From date:
-
-
To date: 12/31/2005
-
-
In this example, if a patient has a diagnosis of
- Acute Myocardial Infarction (MI) entered on the record prior to and including
- 12/31/2005 then their data will be included. If the diagnosis was entered after
- 12/31/2005 then it will not be included.
Users can define a number of times an item has to occur in
- order to be considered a positive "hit". Please note that the Occurrence
- Constraint and Exclusion from the classic query tool have been rolled into
- the same constraint. Here is an example of conversions from the classical query tool
- occurrence and exclude specification to the new occurrence constraint
- specification:
-
-
1.
- (Exclude 1) (exclude anyone who has one or more occurrence of the desired
- terms) -> Edit the occurrence to (=0).
-
-
2.
- (Exclude 2) (Exclude anyone who has two or more occurrences of the desired
- terms) -> Edit the occurrence to (<2).
-
-
3.
- (1) (Only take those who have one or more occurrences of the desired terms)
- -> Edit the occurrence to (>0). (This is the default)
-
-
4.
- (2) (Only take those who have two or more occurrences of the desired terms)
- -> Edit the occurrence to (>2).
1. Click on the Occurrence Count
- Control located in the top part of a Group Panel.
-
-
-
-
2.
- The Occurrence Count Editor will open.
-
-
-
-
3. Use the dropbox to select the
- desired operator and the spinner to choose the desired number. The dropbox has the following options:
-
-
-
-
4. Click on the OK button to accept.
-
-
5.Occurrence Count Control will
- update to the new constraint (4 examples provided below):
-
-
-
-
Different operator/number combinations will have different
- background. The default (>0) is white with gray text. If the operator is > and
- the number is greater than 0, then it will be green. If the operator is < or =,
- then the background will be pink. Please note that choosing the equal (=)
- operator restricts the number to zero (0) - you cannot choose equals x
- (=x), where x is any non-zero number.
Value constraints can be associated with concept and modifiers
- but not all of them will have values. For instance, the diagnosis of Acute Myocardial
- Infarction does not have a value but the tests used to make the diagnosis do have
- values (high/ low flags, or numeric values, etc.).
-
-
Flag Value
-
-
Flags are defined in the source system when the value is entered. The following are some examples that can be found in the i2b2 Demo database.
-
-
-
-
High
-
Low
-
Abnormal
-
-
-
-
-
Setting the Value Constraint (Flag) for a Concept
-
-
-
-
-
-
NOTE:
-
- The value constraint window will open automatically when you drop a concept into a panel in the Query Tool view. This will only happen if the concept is set up in the database with XML metadata. The first three steps can be used if you did not add a value constraint when you added the item or if you wish to edit an existing item.
-
-
-
-
-
-
-
-
-
Using the right mouse button, click on the item listed in the panel.
-
A pop-up menu will open.
-
Select Set Value from the list.
-
-
-
-
-
-
-
A new window will open.
-
-
-
-
-
-
-
Click on the radial dial next to By flag.
-
A new field with a drop-down selection box will appear.
-
-
-
-
-
-
-
Click on the drop-down arrow to change the flag or accept the default.
-
Click on the OK button.
-
The value constraint has been set.
-
-
-
-
-
-
-
-
Setting the Value Constraint (Flag) for a Modifier
-
-
-
-
-
-
NOTE:
-
- The modifier value constraint window will open automatically when you drop a modifier into a panel in the Query Tool view. This will only happen if the modifier is set up in the database with XML metadata. The first three steps can be used if you did not add a value constraint when you added the item or if you wish to edit an existing item.
-
-
-
-
-
-
-
-
-
Using the right mouse button, click on the item listed in the panel.
-
A pop-up menu will open.
-
Select Set Value from the list.
-
-
-
-
-
-
-
A new window will open.
-
Click on the radial dial next to By flag.
-
A new field with a drop-down selection box will appear.
-
Click on the drop-down arrow to change the flag or accept the default.
-
Click on the OK button.
-
The value constraint has been set.
-
-
-
-
-
Text Value
-
-
The text value is defined in the source system when the value is entered. The following are some examples that can be found in the i2b2 Demo database.
-
-
-
-
Test Not Performed
-
Borderline
-
Positive
-
-
Setting the Value Constraint (Text) for a Concept
-
-
-
-
NOTE:
-
- The value constraint window will open automatically when you drop a concept into a panel in the Query Tool view. This will only happen if the concept is set up in the database with XML metadata. The first three steps can be used if you did not add a value constraint when you added the item or if you wish to edit an existing item.
-
-
-
-
-
-
-
-
-
Using the right mouse button, click on the item listed in the panel.
-
A pop-up menu will open.
-
Select Set Value from the list.
-
-
-
-
-
-
-
A new window will open.
-
-
-
-
-
-
-
Click on the radial dial next to By value.
-
A new field listing the enumerated values will appear.
-
Click on the name of the value you want to include.
-
-
-
-
-
-
-
-
-
-
TIP:
-
- To select more than one you can hold down the <Ctrl> key while clicking on each name. On the Macintosh you can hold down the command key instead of the <Ctrl> key.
-
-
-
-
-
-
-
-
Click on the OK button.
-
The value constraint has been set.
-
-
-
-
-
-
-
-
Setting the Value Constraint (Text) for a Modifier
-
-
-
-
-
-
NOTE:
-
- The modifier value constraint window will open automatically when you drop a modifier into a panel in the Query Tool view. This will only happen if the modifier is set up in the database with XML metadata. The first three steps can be used if you did not add a value constraint when you added the item or if you wish to edit an existing item.
-
-
-
-
-
-
-
-
-
Using the right mouse button, click on the item listed in the panel.
-
A pop-up menu will open.
-
Select Set Modifier Value from the list.
-
-
-
-
-
-
-
A new window will open.
-
-
-
-
-
-
-
Click on the radial dial next to By value.
-
A new field listing the enumerated values will appear.
-
Click on the name of the value you want to include.
-
-
-
-
-
-
-
-
-
-
TIP:
-
- To select more than one you can hold down the <Ctrl> key while clicking on each name. On the Macintosh you can hold down the command key instead of the <Ctrl> key.
-
-
-
-
-
-
-
-
Click on the OK button.
-
The value constraint has been set.
-
-
-
-
-
-
-
-
Numeric Value>
-
The numeric value is defined in the source system when the result is entered. The following are some example formats that can be found in the i2b2 Demo database.
-
-
-
-
200
-
1.3
-
-
-
-
Unlike flag and text values, numeric values use operators, such as greater than or less than when setting the constraints. The following is a listing of operators currently in use.
-
-
-
-
-
Operator
-
Description / Use
-
-
-
Less Than (<)
-
Any value less than the number entered.
-
-
-
Less Than or Equal To (<=)
-
Any value less than or equal to the number entered (inclusive).
-
-
-
Equal To (=)
-
An exact match to the number entered.
-
-
-
Between
-
Any value in the range of numbers entered.
-
-
-
Greater Than (>)
-
Any value greater than the number entered.
-
-
-
Greater Than or Equal To (>=)
-
Any value greater than or equal to the number entered (inclusive).
-
-
-
-
-
-
Setting the Value Constraint (Numeric) for a Concept
-
-
-
-
-
-
NOTE:
-
- The value constraint window will open automatically when you drop a concept into a panel in the Query Tool view. This will only happen if the concept is set up in the database with XML metadata. The first three steps can be used if you did not add a value constraint when you added the item or if you wish to edit an existing item.
-
-
-
-
-
-
-
-
-
-
Using the right mouse button, click on the item listed in the panel.
-
A pop-up menu will open.
-
Select Set Value from the list.
-
-
-
-
-
-
-
A new window will open.
-
-
-
-
-
-
-
Click on the radial dial next to By value.
-
Two new fields will appear; one with a drop down selection box and the other a text box.
-
-
-
-
-
-
-
Click on the drop-down arrow to change the operator or accept the default.
-
-
-
-
-
-
-
Enter a numerical value at the Please enter a value field.
-
-
-
-
-
-
-
Click on the OK button.
-
The value constraint has been set.
-
-
-
-
-
-
-
-
-
Setting the Value Constraint (Numeric) for a Modifier
-
-
-
-
-
-
NOTE:
-
- The modifier value constraint window will open automatically when you drop a modifier into a panel in the Query Tool view. This will only happen if the modifier is set up in the database with XML metadata. The first three steps can be used if you did not add a value constraint when you added the item or if you wish to edit an existing item.
-
-
-
-
-
-
-
-
-
-
Using the right mouse button, click on the item listed in the panel.
-
A pop-up menu will open.
-
Select Set Modifier Value from the list.
-
-
-
-
-
-
-
A new window will open.
-
-
-
-
-
-
-
Click on the radial dial next to By value.
-
Two new fields will appear; one with a drop down selection box and the other a text box.
-
-
-
-
-
-
-
Click on the drop-down arrow to change the operator or accept the default.
-
-
-
-
-
-
-
Enter a numerical value at the Please enter a value field.
-
-
-
-
-
-
-
Click on the OK button.
-
The value constraint has been set.
-
-
-
-
-
-
-
-
Using Units In Value Constraints
-
Units in regards to i2b2 are the standard units of measurement associated with a value. For instance, a medication may have "mg" listed as the unit for the dose, while a HGB lab test may have "gm/dL".
-
-
-
The units are defined in the source system and although it is recommended that all numerical facts are stored in normalized units it is recognized that this is not always feasible. Therefore, the Web Client has the ability to convert the units when running a query.
-
-
-
In order for this feature to work a parameter called CRC_ENABLE_UNITCD_CONVERSION must be defined for the project. If this is not defined you need to contact your system administrator.
-
-
-
-
-
Defining the Units When Running a Query
-
-
-
-
-
NOTE:
-
- The modifier value constraint window will open automatically when you drop a modifier into a panel in the Query Tool view. This will only happen if the modifier is set up in the database with XML metadata. The first three steps can be used if you did not add a value constraint when you added the item or if you wish to edit an existing item.
-
-
-
-
-
-
Using the right mouse button, click on the item listed in the panel.
-
A pop-up menu will open.
-
Select Set Modifier Value from the list.
-
-
A new window will open.
-
-
Click on the radial dial next to By value.
-
Two new fields will appear; one with a drop down selection box and the other a text box.
-
-
The Units will default to the normal units defined for the item.
-
Click on the drop-down arrow to change the units.
-
-
Click on the drop-down arrow to change the operator or accept the default.
-
-
Enter a numerical value at the Please enter a value field.
-
-
Click on the OK button.
-
The value constraint has been set and the numerical value has been converted to the normal units.
-
-
-
In the above scenario, the normal units are "mg". When setting up the value constraint the units were changed to "gm" and the numerical value was set to 5. Upon saving the value constraint, the Web Client converted 5 gm to 5000 mg. When the query is run it will look at those facts that have both 5 gm and 5000 mg defined in the observation_fact table.
-
-
-
-
NOTE:
-
- The unit conversion information is specific to the term and is defined in the i2b2 metadata table.
-
-
-
-
-
-
Running a Query
-
-
This section describes the process of running a query and getting results.
Before users submit their query to the server, they must
- select the analysis types they want from the Analysis Type Area in Step 3. There are
- several result types available, each of which will yield a different output.
-
-
-
-
-
-
- Patient list
-
-
-
- Provides a set of patients who met the search criteria.
-
-
-
-
-
- Event list
-
-
-
- Provides a set of encounters for those patients who met the search criteria.
-
-
-
-
-
- Number of patients
-
-
-
- Provides the total number of patients who met the search criteria.
-
-
-
-
-
- Gender patient breakdown
-
-
-
- Provides a breakdown of the patients by their gender.
-
-
-
-
-
- Vital Status patient breakdown
-
-
-
- Provides a breakdown of the patients by their vital status.
-
-
-
-
-
- Race patient breakdown
-
-
-
- Provides a breakdown of the patients by their race.
-
-
-
-
-
- Age patient breakdown
-
-
-
- Provides a breakdown of the patients by their age
-
-
-
-
-
- Timeline
-
-
-
- Provides a set of patients who met the defined criteria and automatically generates a timeline in the timeline view.
-
-
-
-
-
By default Number of patients and Timeline are selected.
This option will return a set of encounters for those patients
- who meet the defined criteria and will add the query and patient list to the
- previous query view.
This option will return a total count for those patients who
- meet the defined criteria and will display the appropriate information in the
- following two views.
-
-
Previous Query View - displays the query and the results returned.
-
-
-
-
Note: The number
- is displayed in the tool tip, which can be seen by hovering over Number of
- Patients.
This option will return a breakdown by gender for those
- patients who meet the defined criteria and will display the appropriate information
- in the following two views.
-
-
Previous Query View - displays the query and the results returned.
This option will return a breakdown by vital status for those
- patients who met the defined criteria and will display the appropriate information in
- the following two views.
-
-
Previous Query View - displays the query and the results returned.
This option will return a breakdown by race for those patients
- who met the defined criteria and will display the appropriate information in the
- following two views.
-
-
Previous Query View - displays the query and the results returned.
This option will return a breakdown by age for those patients
- who met the defined criteria and will display the appropriate information in the
- following two views.
-
-
Previous Query View - displays the query and the results returned.
This option will return a list of patients who met the defined
- criteria and will display the appropriate information in the following two views. The
- current implementation of Temporal QueryTool does not automatically launch the
- Timeline visualization. Instead, users will need to drag the previous query (or the
- patient set) and drop it into Timeline's configuration panel.
-
-
1.
- Timeline View - displays the patients and associated concepts in the format of
- a timeline.
-
-
-
-
2.
- Previous Query View - displays the query and the results returned.
Once the query has been created and the Analysis types
- selected, the final step to retrieve your information is to run the query. This is
- done by clicking on the Submit Query in the query tool.
-
-
-
-
- Once you begin the process of running the query the button become inactive, and a processing indicator will appear:
-
-
-
-
-
When the query process concludes, the results will be shown:
-
-
-
-
If the query takes longer than the Web Client expects, the
- query will be queued up on the server side and will be finished at a later time. An
- entry is created in the Previous Query view immediately and users are to check
- the entry periodically to see when the query completes. The following message will
- also be displayed at the Footer. The Submit Query button will become active so
- users can submit another query.
-
-
-
Cancel a Query
-
-
To cancel a query you simply click on the Cancel Query button.
-
-
-
-
-
NOTE:
-
-
- Keep in mind "Cancel Query" and the associated action will only appear when the query is still in the process of running
-
-
-
-
-
-
-
To cancel a query that is running, simply click on the Cancel Query button.
-
-
-
-
Cancel will display in the Query Status view.
-
-
-
-
-
-
Saving a Query
-
-
A previous query () is created automatically when the query is
- run from the Temporal Query Tool. The query is stored and displayed in the
- Previous Query View. Temporal Query Tool does not currently support
- saving query definitions.
-
-
Note: Previous
- queries can also be seen in Workplace View if the user copied it to their workplace
- or shared folder in workplace view.
-
-
1. Run a query.
-
-
2. Go to the Previous Query View.
-
-
3.
- The query you just ran will now appear in the list of previous queries.
-
-
-
-
-
Printing a Query
-
Users are able to print out the query information if they wish to have a hard copy of the search criteria defined for a query.
-
-
When printing a query you can either print the information for a current query or
- you can drag a previous query to the query tool view and print the information
- associated with that query.
-
The following steps outline the process of printing a query once you have the
- appropriate query in the Query Tool.
-
-
Click on the Print Query button located on the toolbar at the bottom of the Query Tool view
-
-
-
A new window will open displaying the information about the query.
-
-
-
-
On the menu bar, click on File to display the menu options.
The Temporal Query Tool view extends the query functionalities
+ provided by the classic Query Tool view. Users can submit temporal queries to using
+ the Temporal Query Tool view.
+
+
i2b2 Temporal Query Tool View
+
+
The Temporal Query Tool view extends the query
+ functionalities provided by the classic Query Tool view. Users can create and
+ submit temporal queries to using the Temporal Query Tool view. It submits a
+ "select query" that will retrieve information from the database associated to the
+ i2b2 Web Client.
The interface is organized to facilitate the temporal querying
+ process. There are three main steps in the process: Defining a population, defining
+ temporal relationships, and reviewing and submitting query. The interface is designed
+ to take users through each of these three steps. The section below describes the
+ interface for each step in detail.
The image below shows the starting point of the Temporal
+ Query Tool view interface along with its annotations. Users would interact with
+ the Group Panels to define a population they are interested in. In the next
+ step, users would define the temporal relationships they are interested in. Finally,
+ users would review and submit their queries in the third step. This section breaks
+ down the interface for the 1st step.
+
+
+
+
The Patient/Encounter Dropdown Box allows users to
+ choose whether to define the population of the query using patients or encounters.
+ The default is Patient:
+
+
+
+
Creating a population is optional. Users can skip Step 1 to use all data in the database.
At the start up, the interface for Step 1 displays three
+ groups by default. Each of the groups contains several components. In general, all
+ areas bounded by an orange-yellow highlight are clickable.
+
+
+
+ (Group Heading) The heading is a label to easily identify the collection of terms.
+ Each heading will contain "Group" followed by a sequential number.
Example: Group 1, Group 2, Group 3, etc.
+
+
+ (Selection Criteria) This area of the panel is used to define date selections and other constraints.
+
+
+ (Panel Timing) The panel timing defines the constraint on the panel level and uses the patient's visits in determining eligibility.
+
+
+ (Group List) This section contains the terms that will be used during the process of querying the database.
+
+
+ (Delete Group) Clicking on this button will remove the group from the
+ query construction. Users should use it to quickly discard a group.
+
+
+ (Information Box) The content in the information box will change depending on whether or not a term is listed in the panel / group.
+
+
No term(s) listed
+
+
The message will appear as "drop a term on here"
+
The color of the box will be yellow
+
+
+
Term(s) listed
+
+
The message will appear as "one or more of these"
+
The color of the box will be green
+
An additional information box will appear between panels
A previous query saved in Workplace view or in the
+ Previous Query view can be dragged and dropped here to reload the query.
+ Reloading a query will overwrite the current query information. If the previous query
+ is a temporal query, its population and temporal relationships will all be loaded. If
+ the previous query is a non-temporal query, only the population portion of the
+ temporal query interface will be loaded since a non-temporal query has no temporal
+ relationship information.
Step 2:Define Temporal Relationships is used to
+ define temporal relationships. It allows users to create a list of Events and
+ a list of Temporal Relationships. Users define a list of interested
+ Events and also define Temporal Relationships to describe how the
+ events are related temporally, e.g. Event A must occur before Event B.
+
+
The interface is therefore a bit more complicated than Step 1
+ presented in the earlier section. It is broken into two major parts, presented below.
+ On the left are the Event in Query panel and the Show Population panel.
+ The Event in Query panel lets users define a list of Events. The Show
+ Population panel allows users see and change the population definition originally
+ defined in Step 1. On the right is a panel allowing users to add, remove, or modify
+ relationships among the events.
The Events in Query Panel allows users to add, remove, and
+ edit each Event. Each Event is represented by an Event Panel. An
+ Event consists of a list of Groups just like a population definition. Users
+ can add, remove, and edit each of the Groups in an Event by dragging
+ terms into a group, changing its constraints, etc. At startup, two empty
+ Events are added, each with a Group. More Events can be added by
+ clicking on the Add Event button.
+
+
One difference between an Event and a set of
+ Groups in Step 1 is that the first Group in an Event is special.
+ It cannot be removed (note the missing Remove Group button), and its Group
+ BindingControl is missing. The Group Binding for the 1st
+ Group of every Event is not changeable. All other Group's
+ Group Bindings are changeable. The first group anchors all other groups in an
+ Event. That is, the first Group determines the timing of the enclosing
+ Event with respect to the other Events temporally in the query.
+
+
Under the list of Events is the gray background, which serves
+ as a Query Drop Area. Users can drop previous query in the Query Drop
+ Area to overwrite the current query. It has the same effect as the Query Drop
+ Area in Step 1.
+
+
An Event Panel has several components.
+
+
+
+
+
+ (Event ID) This area shows the Event's name and color. Clicking on this area
+ will expand/collapse the entire Event. When an Event Panel is
+ collapsed, all its Groups are hidden. Only a row that contains the Event
+ ID area is shown. Click on the Event ID area to expand the Event.
+ All Events are expanded when created. Color of an Event is assigned
+ only when at least one term has been added to it.
+
+
+
(Event-Wide Date
+ Constraints) Selecting this area allows users to specify date constraints for all
+ Groups in this Event. This serves a similar function as the
+ supplemental Query-wide Date Constraints Control Panel in the Step 1.
+
+
(Remove Event Button)
+ Clicking this button will remove the Event, deleting all its content and
+ removing it from view.
+
+
(Group Panel) The Group
+ Panel is the same as the ones in Step 1.
+
+
(Add Group Button)
+ Clicking on it adds a new Group to the Event.
+
+
+
+
+
The population in Step 1 is shown. The title changes to "Edit
+ Population," and every component is editable just as they are in Step 1.
On the right hand side of the Step 3 interface is where users
+ can define how Events are related to one another temporally. The Temporal
+ Relationship Definition Panel contains a list of Temporal Relationship
+ Panels and an Add Temporal Relationship Button. These components are
+ described in detail below.
+
+
Please note that at least one Temporal Relationship
+ Panel must be filled before users can move on to Step 3. A Temporal
+ Relationship Panel is filled only if has a fulfilled Event in the Top Event
+ Definition dropdown box and a fulfilled Event in the Bottom Event
+ Definition dropdown box (see the image below). A fulfilled Event is one that has
+ at least a fulfilled Group. A fulfilled Group is one that contains at
+ least one term (not empty).
+
+
+
+
+
+ The color indicator shows the colors of the Events
+ that are being referenced in the Temporal Relationship. The top color (green
+ in this example) matches the color of the Event in the Top Event
+ Definition row and the bottom color (orange) matches the color of the
+ Event in the Bottom Event Definition row. If an Event that has
+ no content is referred, no color will be displayed in the Color Indicator.
+
+
+ (Top Event Definition)This row allows users designate the first Event
+ in this Temporal Relationship. A second event is specified in the Bottom
+ Event Definition row. The dropdown boxes have the following choices:
+
+
(Dropdown box options for Event Definition)
+
+
+
+ (Event Ordering) This dropdown box describes how the Top Event elates
+ to the Bottom Event.
+
+
(Dropdown box options for Event Ordering)
+
+
+ (Bottom Event Definition) This row allows users designate the second
+ Event in this Temporal Relationship. It has the same dropdown box
+ options as Top Event Definition.
+
+
+ (Occurrence Temporal Constraint) Users can optionally describe the specified
+ Event Ordering by a time range, creating the bolded part of, for example,
+ "Event 1 Occurs Before Event 2 By > 5 day(s)." This additional temporal
+ constraint can be a bounded range such as "By > 5 day(s) And < 10
+ day(s)." Users must first check the "By" checkbox to enable the dropdown
+ boxes on that row. The "And" checkbox becomes enabled only when the
+ "By" checkbox is checked. Checking the "And" checkbox enables the
+ dropdown boxes on its row. Both the By row and the And row have the
+ same options depicted below.
+
+
+ (Options for Occurrence Temporal Constraint)
+
+
+
+
+ (Add Temporal Relationship Button) This adds a new Temporal Relationship Panel
+ should users require more relationship constraints among Events.
+
The last step allows users to review and modify the name of
+ the query and selection of analyses types they want the server to return as the
+ results of the query.
Upon entering Step 3, a query name is automatically generated.
+ A "(t)" prefix indicates the query is a temporal query, differentiating it from
+ normal queries submitted using the classic query tool. Some terms used in the query
+ are then appended to identify this query. A timestamp is added at the end. Users may
+ modify the query name however they wish. The name in the Query Name Area will
+ be displayed in the Previous Query view once the query is submitted
The area presents the different analyses types users can
+ select as results of the query. They are exactly the same as the ones from the
+ classic Query Tool:
+
+
+
+
+
+ Table of Result Types
+
+
+
+
+
+ Patient list
+
+
+
+ Provides a set of patients who met the search criteria.
+
+
+
+
+
+ Event list
+
+
+
+ Provides a set of encounters for those patients who met
+ the search criteria.
+
+
+
+
+
+ Number of patients
+
+
+
+ Provides the total number of patients who met the
+ search criteria.
+
+
+
+
+
+ Gender patient breakdown
+
+
+
+ Provides a breakdown of the patients by their gender.
+
+
+
+
+
+ Vital Status patient breakdown
+
+
+
+ Provides a breakdown of the patients by their vital
+ status.
+
+
+
+
+
+ Race patient breakdown
+
+
+
+ Provides a breakdown of the patients by their race.
+
+
+
+
+
+ Age patient breakdown
+
+
+
+ Provides a breakdown of the patients by their age
+
+
+
+
+
+ Timeline
+
+
+
+ Provides a set of patients who met the defined criteria
+ and automatically generates a timeline in the timeline view.
+
+
+
+
+
+
By default Number of patients and Timeline are selected.
In Step 3, the Footer is different. Instead of another "Next"
+ button, a Submit Query Button is there instead. It allows users to execute the
+ query they have built in Step 1 and Step 2.
+
+
After pressing Submit Query, the button will become inactive
+ to prevent inadvertent submission. A "Processing..." text will display to indicate
+ that the query is being sent to the server for processing. The red rectangular button
+ allows users to cancel the query submission.
+
+
+
+
When the server completes the processing, the number of patients found will be returned:
+
+
+
+
If the query takes too long, a message will be
+ displayed instead, in addition, the Submit Query Button will become available
+ again. Users are advised to monitor the Previous Queries view to see when the
+ query finishes.
+
+
+
+
+
NOTE:
+
+ The result types that appear will depend on what you have selected when running the query..
+
Many of the UI elements discussed above are for display only.
+ That is, they display the content of a Group or an Event or a Query, but they do not
+ themselves allow editing of the values. Instead, users have to click on display
+ components to launch an editor. The various editors are presented here.
+
+
This dialogs are all modal. That means no other actions can be
+ performed when the dialog is launched. Users must first dismiss (typically by either
+ selecting OK or Cancel) the dialog before other UI elements in the Web Client can be
+ interacted with.
+
+
The dialogs can be moved by dragging the blue title area
+ around, and they usually appear where the mouse pointer is when launched.
+
+
+
+ (Date Constraint Editor) The Date Constraint Editor is launched when
+ user clicks on a Date Constraint Control in every Group Panel, in the
+ title area of an Event, in the Supplemental Control Panel in Step 1,
+ and in the View Population Panel in Step 2.
+
+
The editor starts up as the left-most figure below. Clicking
+ on either of the orange-yellow-highlighted textboxes will launch a calendar widget
+ for users to select the start (middle figure) or the end date (right-most figure).
+ When finished, users should click on the OK button in the gray footer area to
+ accept the constraints. Alternatively, clicking the Cancel button will leave
+ the original date constraints unmodified.
+
+
The start and end date constraints are both inclusive. That is
+ if the start date is January 1, 1999, and the end date is December 31, 1999, the
+ range of the constraint spans from 1/1/1999 00:00:00.000 to 12/31/1999
+ 23:59:59.999.
+
+
+
+
+
+ (Group Binding Editor) The Group Binding Editor is found in every
+ Group Panel. It lets users change the binding for that Group. The left
+ figure depicts the initial appearance when a Group Binding Editor is launched.
+ It consists of three rows, each represent a binding option. The last option
+ (Bound-by-Observation) is only available as a choice if a modifier is dropped
+ in the Group. Selecting one of the radio buttons and clicking on OK
+ will set the new binding. Cancel will cancel the operation and leave the
+ original binding unmodified.
+
+
+
+
+
+ (Occurrence Count Constraint Editor) This editor can be launched in every
+ Group by clicking on its Count Control area. Users can specify how many (or
+ few) times the terms in a Group must occur. The editor itself is simple: a
+ dropdown box specifies the type of operator and a spinner allowing for a number to be
+ specified.
+
+
The left figure shows the dialog at startup, and the right
+ figure shows all the operator options.
+
+
+
+
+
+ (Value Editor) When users drop an ontology term that can be further
+ constrained by values into a Group, a Value Editor will automatically
+ launch. Users can use this editor to select a way to constrain the value of the term
+ and specify what values to constrain the term by. If a term that supports values
+ already exists in a Group, users can right click on the term and select
+ "Edit Value..." to launch the Value Editor for that term. Please note
+ that some Modifiers do not support values (e.g. Circulatory Systems [Primary
+ diagnosis]).
+
+
(Right click on a term that supports value
+ constraints to launch the Value Editor)
+
+
Note that the constraint is optional. The default constraint
+ put on these terms is "No Value," and by closing the dialog immediately, users
+ can quickly accept the default constraint. Please note that closing the dialog does
+ not cancel the value editing operation, it instead accepts the values that are
+ currently set.
+
+
If multiple terms were dropped at the same time, all terms
+ that support value constraints in the same drop will appear in a list the left side
+ of dialog. Users can select the terms on the list to view and edit its value
+ constraint. Alternatively, users can use the navigation buttons "Previous",
+ "Next" to navigate. Finally, to finish, users should select the last term on
+ the list and click on "Finish."
+
+
(The Value Editor
+ shows two terms on its list on the left. The right half shows the currently set value constraints for the selected
+ term on list. The default is "No Value." Users can also navigate the list by using
+ the "Next" "Previous" buttons on the bottom of the right half. When
+ finished, click on the "Finish" button or simply close the dialog.)
+
+
Different terms support different kinds of value constraint,
+ some are constrained by text, some by numeric value, some by a list of pre-arranged
+ values, and some by abnormal flags. For example, the Color term supports abnormal
+ flags and a list of pre-arranged values. These options are shown on the right half of
+ the dialog. By selecting the radio buttons, users can choose the kind of constraint
+ they want. Here are the screen shots of the right half of the dialog when radio
+ buttons other than "No Value" are chosen for the term Color.
+
+
+
+
+
+
Creating a Query
+
+
This section describes the process of adding items to the
+ query tool, "AND" / "OR" operators and setting constraints.
In order to create your query, you will need to define what
+ information will be retrieved from the databases. Selected items from other i2b2
+ Web Client views can be dragged and dropped (copied) into the TemporalQuery
+ Tool view.
+
+
+
+
Concepts
+
+
Concepts() can be defined as terms,
+ results, providers, etc. They can be added as a group (folder ()) or
+ individually by dragging the item(s) from Navigate Terms, Find Terms,
+ and Workplace views.
+
+
+
Modifiers
+
+
Modifiers()
+ are associated with a concept or group of concepts. They can be added as a group (modifier folder
+ ()) or
+ individually by dragging the item(s) from Navigate Terms, Find Terms, and Workplace views.
+
+
+
Previous Query
+
+
A new query can be created from one that has already
+ been run by dragging the previous query(
+ or)
+ from Previous Query and Workplace views.
+
+
+
+ Patient List
+
+
A patient list()
+ can be used in a query by dragging the item(s) from Previous Query and Workplace views.
+
+
+
Individual Patient
+
+
A patient () or several patients can be used in a
+ query by dragging them from Previous Query view and Workplace views.
+
+
+
Event List
+
+
An event list()
+ can be used in a query by dragging the item(s) from Previous Query and Workplace views.
+
+
Query Definition
+
+
A new query can be created from one that has already
+ been run by dragging the query definition()
+ from the Workplace view.
+
+
Group Template
+
+
Users can define a group of concepts that they
+ frequently run and save them in their workplace view. This grouping of concepts is
+ referred to as a group template().
+
+
A new query can be created using the group template
+ by dragging the template from Workplace view to the Group Header.
There are two operators, known as SQL Logical
+ Operators, which are necessary when running a query that has more than one term.
+ These operators provide a way to specify exactly what users want to retrieve. The
+ operators are the 'AND' and 'OR' operators.
+
+
The query tool knows which operator to use based on the panels
+ used when defining the query. It is important to verify the users are setting up
+ their query correctly as each operator will return different results.
Information in the Workplace is related to the most
+ common concepts, modifiers, and queries that an individual uses and in essence
+ becomes their personal workplace.
Information in the Workplace is related to the most
+ common concepts, modifiers, and queries that an individual uses and in essence
+ becomes their personal workplace.
A previous query can be used to run a new query or as
+ an item within a query (query-in-query). To add a previous query to the Query Tool
+ view simply drag the query name from one of the following views.
+
+
1. Previous Query view
+
+
2. Workplace view
+
+
Within the Query Tool view, the previous query can be added to one of the following two locations.
+
+
+
+
+ Query Name field
+
+
+
+ The item(s) and constraints from the original query will
+ be used to create a new query. This information can be edited to make a new
+ query or can be used as is to run the query again.
+
+
+ Please note that the tool does not currently support
+ dropping of a previous query of a previous query or a previous query of a temporal query.
+
+
+
+
+
+ Panel (Group)
+
+
+
+ Used within a new query (query-in-query). Add additional search criteria (items) to be used in the new query.
+
+
+
+
+
How to add a previous query from each of the views listed above is explained in the next few sections.
1. In the Previous Query view
+ highlight the previous query() by clicking on its name
+
+
2. While holding the left mouse
+ button down, drag the item over to the TemporalQuery Tool View.
+
+
3. Drop the previous query into the
+ Query DropArea in either Step 1 or Step 2.
+
+
4. The terms, Groups,
+ Events, and Temporal Relationships defined in that previous query will
+ be reconstituted in the current interface. If the previous query is a non-temporal
+ query, then only the Population portion of the UI will be reconstituted. If the
+ previous query is a temporal query, then both the Population portion and the temporal
+ relationship portion of the UI will be reconstituted.
Information in the workplace is related to the most
+ common concepts, modifiers, and queries that an individual uses and in essence
+ becomes their personal workplace.
1. In the Workplace view, expand
+ the folder(s) that contains the previous query you want to add.
+
+
2. Highlight the previous query
+ () by clicking on its name
+
+
3. While holding the left mouse
+ button down, drag the item over to the Query Tool View.
+
+
4. Drop the previous query into the
+ Query Drop Area in either Step 1 or Step 2.
+
+
5. The terms, Groups,
+ Events, and Temporal Relationships defined in that previous query will
+ be reconstituted in the current interface. If the previous query is a non-temporal
+ query, then only the Population portion of the UI will be reconstituted. If the
+ previous query is a temporal query, then both the Population portion and the temporal
+ relationship portion of the UI will be reconstituted.
Information in the workplace is related to the most
+ common concepts, modifiers, and queries that an individual uses and in essence
+ becomes their personal workplace.
Information in the workplace is related to the most
+ common concepts, modifiers, and queries that an individual uses and in essence
+ becomes their personal workplace.
1. In the Workplace view, find
+ the query definition you want to add.
+
+
+
+
2. Highlight the query
+ definition() by clicking on its name
+
+
3. While holding the left mouse
+ button down, drag the item over to the Query Tool View.
+
+
4. Drop the query definition into the
+ Query Drop Area in Step 1 or Step 2.
+
+
5. The item(s) associated with the
+ query definition will display in the appropriate group(s), the name of the query will
+ appear at Query Name, and any constraints that were defined when the original
+ query was run will now default with the new query.
Three Group Panels are displayed in Step 1 by default.
+ In step 2, only one Group Panel is available per Event. Some complex
+ queries may require the use of additional panels. Users may use the "Add Group"
+ button to add more Groups.
+
+
1.
+ Click on the Add Group button.
+
+
+
+
(Add Group button in Step 1)
+
+
2.
+ A new panel is added with each click (two clicks are performed here to create a total
+ of three Group Panels).
+
+
+
+
In Step 2, there is an "Add Group" button for each Event, and
+ an additional one to add Group to the population. These "Add Group" button work
+ exactly the same as the one described above.
Constraints are used to narrow down the search criteria to a
+ particular time from, number of occurrences or a specific value or range of values.
+ In i2b2, there are several types of constraints that can be defined in the Query Tool
+ view.
+
+
+
+
+ Constraint Type
+
+
+
+ Description
+
+
+
+
+
+ Group Binding (Panel Timing)
+
+
+
+ Constraint is defined on the Group and utilizes the
+ patient encounters and / or instance number when determining eligibility. There
+ are three binding choices. The most general one is bound-by-patient, followed
+ by bound-by-encounter, and finally, the strictest one is
+ bound-by-observation.
+
+
+
+
+
+ Date
+
+
+
+ Constraint uses a date range when determining eligibility.
+
+
+
+
+
+ Occurrence
+
+
+
+ Constraint is by the number of occurrences an item is documented.
+
+
+
+
+
+ Value
+
+
+
+ Constraint is by the value associated to a concept or modifier. Not all items have values.
+
+
+
+
+
Note: In the
+ client, the value constraints are currently the only ones that directly correspond to
+ a single concept. All others are defined on the query or Group level.
Group binding constraints utilize the encounter/observation
+ information along with the items defined to determine if a patient meets the search
+ criteria.
+
+
Note that this is previously known as Panel Timing in the
+ classic Query Tool. In the classic Query Tool, users can also specify
+ Query Timing. In the Temporal Query Tool, Query Timing is automatically set by
+ the choice of Group Bindings. That is, the strictest Group Binding dictates what the
+ Query Timing is:
+
+
- if there is a
+ Group that is "bound-by-observation," then the query timing will be
+ "bound-by-observation" (or in the classical terminology, "same instance.")
+
+
- If there is a
+ Group that is bound-by-encounter," but no Groups "bound-by-observation," then the
+ query timing will be "bound-by-encounter," (or classically, "same encounter.")
+
+
- Otherwise the
+ query timing is "bound-by-patient" ("treat independently.")
Group Binding sets the binding for each Group. Possible values
+ are Bound-by-Patient, Bound-by-Encounter, and
+ Bound-by-Observation. These constraints tell the query processor that these
+ Groups describe the same patient, encounters or observation.
+
+
In step 1, the default binding for each Group changes
+ depending on whether users are defining a Patient Population or an Encounter
+ Population. If Patient Population is used, then Bound-by-Patient is the
+ default, and it is unchangeable. If Encounter Population is used, then
+ Bound-by-Encounter is the default. However, in this case, users can change
+ each Group's binding to Bound-by-Patient if they so desire or to
+ Bound-by-Observation if a modifier term is used in that Group.
+
+
Users can select one of three available options:
+
+
1.(Bound-by-Patient) The
+ items (facts) can occur at any time in the patient's history.
+
+
2.(Bound-by-Encounter) The
+ items (facts) occur during the same encounter (e.g. visit to hospital).
+
+
3.(Bound-by-Observation) The
+ items (facts) occur during the same observation.
+
+
The values are hierarchical: a Group that is
+ bound-by-observation is also bound-by-encounter and bound-by-patient. A group that is
+ bound-by-encounter is also bound-by-patient. Every group is bound-by-patient.
+
+
The Group Binding for a Group can be set by launching
+ the Group Binding Editor, by clicking on the highlighted area in a Group:
+
+
+
+
The Group Binding Editor consists of 3 rows, each representing
+ a possible Group Binding value. Selecting one will set the value.
+
+
Users can also set the Group binding for all
+ Groups using the Group Binding Control Panel in the Supplemental
+ Control Panel in Step 1.
The items (facts) occur during the same encounter (e.g. visit to hospital).
+
+
+
+
Example:
+
+
Patient has a diagnosis of Acute MI documented at any time in their history and they have a medication with a dose greater
+ than 500 mg and a medication that is taken once a day documented
+ during the same encounter.
+
+
+
+
RESULTS: In our database, there are 4 patients who have
+ had a medication with a dose greater than 500 mg and a frequency of once a day
+ entered as a fact in the observation_fact table, where the medication dose and
+ frequency have the sameencounter_numAND the
+ diagnosis of acute MI, the medication dose and frequency all have the samepatient_num.
The items (facts) listed in the panel occur during the same observation of a visit.
+
+
Example:
+
+
Patient has a diagnosis of Acute MI documented at any
+ time in their history and they have a medication with a dose greater
+ than 500 mg and a medication that is taken once a day documented
+ during the same instance.
+
+
+
+
RESULTS: In our database, there are 3 patients who
+ have had a medication with a dose greater than 500 mg and a frequency of once a
+ day entered as a fact in the observation_fact table, where the medication dose
+ and frequency have the sameencounter_numANDinstance_num
+ AND the diagnosis of acute MI, the medication dose and frequency all
+ have the samepatient_num.
Users can define a date range to be used when querying the
+ database. This date range can be in any one of the following combinations. Note that
+ all start and end dates are inclusive.
Only data with activity within the defined date range will be used.
+
+
Example:
+
+
+
+
Concept: Acute Myocardial Infarction
+
+
From date: 01/01/2001
+
+
To date: 12/31/2005
+
+
In this example, if a patient has a diagnosis of
+ Acute Myocardial Infarction (MI) entered on the record from 01/01/2001 to 12/31/2005
+ then their data will be included. If the patient does have an MI diagnosis but it was
+ entered prior to 01/01/2001 or after 12/31/2005 then their information will not be
+ included.
Data from the defined start date to the latest date available. No end date defined.
+
+
Example:
+
+
+
+
Concept: Acute Myocardial Infarction
+
+
From date: 01/01/2001
+
+
To date:
+
+
In this example, if a patient has a diagnosis of
+ Acute Myocardial Infarction (MI) entered on the record any time on or after
+ 01/01/2001 will be included. If the diagnosis was entered prior to 01/01/2001 then
+ the data will not be included.
All data up until the defined end date. No start date
+ defined.
+
+
Example:
+
+
+
+
Concept: Acute Myocardial Infarction
+
+
From date:
+
+
To date: 12/31/2005
+
+
In this example, if a patient has a diagnosis of
+ Acute Myocardial Infarction (MI) entered on the record prior to and including
+ 12/31/2005 then their data will be included. If the diagnosis was entered after
+ 12/31/2005 then it will not be included.
Users can define a number of times an item has to occur in
+ order to be considered a positive "hit". Please note that the Occurrence
+ Constraint and Exclusion from the classic query tool have been rolled into
+ the same constraint. Here is an example of conversions from the classical query tool
+ occurrence and exclude specification to the new occurrence constraint
+ specification:
+
+
1.
+ (Exclude 1) (exclude anyone who has one or more occurrence of the desired
+ terms) -> Edit the occurrence to (=0).
+
+
2.
+ (Exclude 2) (Exclude anyone who has two or more occurrences of the desired
+ terms) -> Edit the occurrence to (<2).
+
+
3.
+ (1) (Only take those who have one or more occurrences of the desired terms)
+ -> Edit the occurrence to (>0). (This is the default)
+
+
4.
+ (2) (Only take those who have two or more occurrences of the desired terms)
+ -> Edit the occurrence to (>2).
1. Click on the Occurrence Count
+ Control located in the top part of a Group Panel.
+
+
+
+
2.
+ The Occurrence Count Editor will open.
+
+
+
+
3. Use the dropbox to select the
+ desired operator and the spinner to choose the desired number. The dropbox has the following options:
+
+
+
+
4. Click on the OK button to accept.
+
+
5.Occurrence Count Control will
+ update to the new constraint (4 examples provided below):
+
+
+
+
Different operator/number combinations will have different
+ background. The default (>0) is white with gray text. If the operator is > and
+ the number is greater than 0, then it will be green. If the operator is < or =,
+ then the background will be pink. Please note that choosing the equal (=)
+ operator restricts the number to zero (0) - you cannot choose equals x
+ (=x), where x is any non-zero number.
Value constraints can be associated with concept and modifiers
+ but not all of them will have values. For instance, the diagnosis of Acute Myocardial
+ Infarction does not have a value but the tests used to make the diagnosis do have
+ values (high/ low flags, or numeric values, etc.).
+
+
Flag Value
+
+
Flags are defined in the source system when the value is entered. The following are some examples that can be found in the i2b2 Demo database.
+
+
+
+
High
+
Low
+
Abnormal
+
+
+
+
+
Setting the Value Constraint (Flag) for a Concept
+
+
+
+
+
+
NOTE:
+
+ The value constraint window will open automatically when you drop a concept into a panel in the Query Tool view. This will only happen if the concept is set up in the database with XML metadata. The first three steps can be used if you did not add a value constraint when you added the item or if you wish to edit an existing item.
+
+
+
+
+
+
+
+
+
Using the right mouse button, click on the item listed in the panel.
+
A pop-up menu will open.
+
Select Set Value from the list.
+
+
+
+
+
+
+
A new window will open.
+
+
+
+
+
+
+
Click on the radial dial next to By flag.
+
A new field with a drop-down selection box will appear.
+
+
+
+
+
+
+
Click on the drop-down arrow to change the flag or accept the default.
+
Click on the OK button.
+
The value constraint has been set.
+
+
+
+
+
+
+
+
Setting the Value Constraint (Flag) for a Modifier
+
+
+
+
+
+
NOTE:
+
+ The modifier value constraint window will open automatically when you drop a modifier into a panel in the Query Tool view. This will only happen if the modifier is set up in the database with XML metadata. The first three steps can be used if you did not add a value constraint when you added the item or if you wish to edit an existing item.
+
+
+
+
+
+
+
+
+
Using the right mouse button, click on the item listed in the panel.
+
A pop-up menu will open.
+
Select Set Value from the list.
+
+
+
+
+
+
+
A new window will open.
+
Click on the radial dial next to By flag.
+
A new field with a drop-down selection box will appear.
+
Click on the drop-down arrow to change the flag or accept the default.
+
Click on the OK button.
+
The value constraint has been set.
+
+
+
+
+
Text Value
+
+
The text value is defined in the source system when the value is entered. The following are some examples that can be found in the i2b2 Demo database.
+
+
+
+
Test Not Performed
+
Borderline
+
Positive
+
+
Setting the Value Constraint (Text) for a Concept
+
+
+
+
NOTE:
+
+ The value constraint window will open automatically when you drop a concept into a panel in the Query Tool view. This will only happen if the concept is set up in the database with XML metadata. The first three steps can be used if you did not add a value constraint when you added the item or if you wish to edit an existing item.
+
+
+
+
+
+
+
+
+
Using the right mouse button, click on the item listed in the panel.
+
A pop-up menu will open.
+
Select Set Value from the list.
+
+
+
+
+
+
+
A new window will open.
+
+
+
+
+
+
+
Click on the radial dial next to By value.
+
A new field listing the enumerated values will appear.
+
Click on the name of the value you want to include.
+
+
+
+
+
+
+
+
+
+
TIP:
+
+ To select more than one you can hold down the <Ctrl> key while clicking on each name. On the Macintosh you can hold down the command key instead of the <Ctrl> key.
+
+
+
+
+
+
+
+
Click on the OK button.
+
The value constraint has been set.
+
+
+
+
+
+
+
+
Setting the Value Constraint (Text) for a Modifier
+
+
+
+
+
+
NOTE:
+
+ The modifier value constraint window will open automatically when you drop a modifier into a panel in the Query Tool view. This will only happen if the modifier is set up in the database with XML metadata. The first three steps can be used if you did not add a value constraint when you added the item or if you wish to edit an existing item.
+
+
+
+
+
+
+
+
+
Using the right mouse button, click on the item listed in the panel.
+
A pop-up menu will open.
+
Select Set Modifier Value from the list.
+
+
+
+
+
+
+
A new window will open.
+
+
+
+
+
+
+
Click on the radial dial next to By value.
+
A new field listing the enumerated values will appear.
+
Click on the name of the value you want to include.
+
+
+
+
+
+
+
+
+
+
TIP:
+
+ To select more than one you can hold down the <Ctrl> key while clicking on each name. On the Macintosh you can hold down the command key instead of the <Ctrl> key.
+
+
+
+
+
+
+
+
Click on the OK button.
+
The value constraint has been set.
+
+
+
+
+
+
+
+
Numeric Value>
+
The numeric value is defined in the source system when the result is entered. The following are some example formats that can be found in the i2b2 Demo database.
+
+
+
+
200
+
1.3
+
+
+
+
Unlike flag and text values, numeric values use operators, such as greater than or less than when setting the constraints. The following is a listing of operators currently in use.
+
+
+
+
+
Operator
+
Description / Use
+
+
+
Less Than (<)
+
Any value less than the number entered.
+
+
+
Less Than or Equal To (<=)
+
Any value less than or equal to the number entered (inclusive).
+
+
+
Equal To (=)
+
An exact match to the number entered.
+
+
+
Between
+
Any value in the range of numbers entered.
+
+
+
Greater Than (>)
+
Any value greater than the number entered.
+
+
+
Greater Than or Equal To (>=)
+
Any value greater than or equal to the number entered (inclusive).
+
+
+
+
+
+
Setting the Value Constraint (Numeric) for a Concept
+
+
+
+
+
+
NOTE:
+
+ The value constraint window will open automatically when you drop a concept into a panel in the Query Tool view. This will only happen if the concept is set up in the database with XML metadata. The first three steps can be used if you did not add a value constraint when you added the item or if you wish to edit an existing item.
+
+
+
+
+
+
+
+
+
+
Using the right mouse button, click on the item listed in the panel.
+
A pop-up menu will open.
+
Select Set Value from the list.
+
+
+
+
+
+
+
A new window will open.
+
+
+
+
+
+
+
Click on the radial dial next to By value.
+
Two new fields will appear; one with a drop down selection box and the other a text box.
+
+
+
+
+
+
+
Click on the drop-down arrow to change the operator or accept the default.
+
+
+
+
+
+
+
Enter a numerical value at the Please enter a value field.
+
+
+
+
+
+
+
Click on the OK button.
+
The value constraint has been set.
+
+
+
+
+
+
+
+
+
Setting the Value Constraint (Numeric) for a Modifier
+
+
+
+
+
+
NOTE:
+
+ The modifier value constraint window will open automatically when you drop a modifier into a panel in the Query Tool view. This will only happen if the modifier is set up in the database with XML metadata. The first three steps can be used if you did not add a value constraint when you added the item or if you wish to edit an existing item.
+
+
+
+
+
+
+
+
+
+
Using the right mouse button, click on the item listed in the panel.
+
A pop-up menu will open.
+
Select Set Modifier Value from the list.
+
+
+
+
+
+
+
A new window will open.
+
+
+
+
+
+
+
Click on the radial dial next to By value.
+
Two new fields will appear; one with a drop down selection box and the other a text box.
+
+
+
+
+
+
+
Click on the drop-down arrow to change the operator or accept the default.
+
+
+
+
+
+
+
Enter a numerical value at the Please enter a value field.
+
+
+
+
+
+
+
Click on the OK button.
+
The value constraint has been set.
+
+
+
+
+
+
+
+
Using Units In Value Constraints
+
Units in regards to i2b2 are the standard units of measurement associated with a value. For instance, a medication may have "mg" listed as the unit for the dose, while a HGB lab test may have "gm/dL".
+
+
+
The units are defined in the source system and although it is recommended that all numerical facts are stored in normalized units it is recognized that this is not always feasible. Therefore, the Web Client has the ability to convert the units when running a query.
+
+
+
In order for this feature to work a parameter called CRC_ENABLE_UNITCD_CONVERSION must be defined for the project. If this is not defined you need to contact your system administrator.
+
+
+
+
+
Defining the Units When Running a Query
+
+
+
+
+
NOTE:
+
+ The modifier value constraint window will open automatically when you drop a modifier into a panel in the Query Tool view. This will only happen if the modifier is set up in the database with XML metadata. The first three steps can be used if you did not add a value constraint when you added the item or if you wish to edit an existing item.
+
+
+
+
+
+
Using the right mouse button, click on the item listed in the panel.
+
A pop-up menu will open.
+
Select Set Modifier Value from the list.
+
+
A new window will open.
+
+
Click on the radial dial next to By value.
+
Two new fields will appear; one with a drop down selection box and the other a text box.
+
+
The Units will default to the normal units defined for the item.
+
Click on the drop-down arrow to change the units.
+
+
Click on the drop-down arrow to change the operator or accept the default.
+
+
Enter a numerical value at the Please enter a value field.
+
+
Click on the OK button.
+
The value constraint has been set and the numerical value has been converted to the normal units.
+
+
+
In the above scenario, the normal units are "mg". When setting up the value constraint the units were changed to "gm" and the numerical value was set to 5. Upon saving the value constraint, the Web Client converted 5 gm to 5000 mg. When the query is run it will look at those facts that have both 5 gm and 5000 mg defined in the observation_fact table.
+
+
+
+
NOTE:
+
+ The unit conversion information is specific to the term and is defined in the i2b2 metadata table.
+
+
+
+
+
+
Running a Query
+
+
This section describes the process of running a query and getting results.
Before users submit their query to the server, they must
+ select the analysis types they want from the Analysis Type Area in Step 3. There are
+ several result types available, each of which will yield a different output.
+
+
+
+
+
+
+ Patient list
+
+
+
+ Provides a set of patients who met the search criteria.
+
+
+
+
+
+ Event list
+
+
+
+ Provides a set of encounters for those patients who met the search criteria.
+
+
+
+
+
+ Number of patients
+
+
+
+ Provides the total number of patients who met the search criteria.
+
+
+
+
+
+ Gender patient breakdown
+
+
+
+ Provides a breakdown of the patients by their gender.
+
+
+
+
+
+ Vital Status patient breakdown
+
+
+
+ Provides a breakdown of the patients by their vital status.
+
+
+
+
+
+ Race patient breakdown
+
+
+
+ Provides a breakdown of the patients by their race.
+
+
+
+
+
+ Age patient breakdown
+
+
+
+ Provides a breakdown of the patients by their age
+
+
+
+
+
+ Timeline
+
+
+
+ Provides a set of patients who met the defined criteria and automatically generates a timeline in the timeline view.
+
+
+
+
+
By default Number of patients and Timeline are selected.
This option will return a set of encounters for those patients
+ who meet the defined criteria and will add the query and patient list to the
+ previous query view.
This option will return a total count for those patients who
+ meet the defined criteria and will display the appropriate information in the
+ following two views.
+
+
Previous Query View - displays the query and the results returned.
+
+
+
+
Note: The number
+ is displayed in the tool tip, which can be seen by hovering over Number of
+ Patients.
This option will return a breakdown by gender for those
+ patients who meet the defined criteria and will display the appropriate information
+ in the following two views.
+
+
Previous Query View - displays the query and the results returned.
This option will return a breakdown by vital status for those
+ patients who met the defined criteria and will display the appropriate information in
+ the following two views.
+
+
Previous Query View - displays the query and the results returned.
This option will return a breakdown by race for those patients
+ who met the defined criteria and will display the appropriate information in the
+ following two views.
+
+
Previous Query View - displays the query and the results returned.
This option will return a breakdown by age for those patients
+ who met the defined criteria and will display the appropriate information in the
+ following two views.
+
+
Previous Query View - displays the query and the results returned.
This option will return a list of patients who met the defined
+ criteria and will display the appropriate information in the following two views. The
+ current implementation of Temporal QueryTool does not automatically launch the
+ Timeline visualization. Instead, users will need to drag the previous query (or the
+ patient set) and drop it into Timeline's configuration panel.
+
+
1.
+ Timeline View - displays the patients and associated concepts in the format of
+ a timeline.
+
+
+
+
2.
+ Previous Query View - displays the query and the results returned.
Once the query has been created and the Analysis types
+ selected, the final step to retrieve your information is to run the query. This is
+ done by clicking on the Submit Query in the query tool.
+
+
+
+
+ Once you begin the process of running the query the button become inactive, and a processing indicator will appear:
+
+
+
+
+
When the query process concludes, the results will be shown:
+
+
+
+
If the query takes longer than the Web Client expects, the
+ query will be queued up on the server side and will be finished at a later time. An
+ entry is created in the Previous Query view immediately and users are to check
+ the entry periodically to see when the query completes. The following message will
+ also be displayed at the Footer. The Submit Query button will become active so
+ users can submit another query.
+
+
+
Cancel a Query
+
+
To cancel a query you simply click on the Cancel Query button.
+
+
+
+
+
NOTE:
+
+
+ Keep in mind "Cancel Query" and the associated action will only appear when the query is still in the process of running
+
+
+
+
+
+
+
To cancel a query that is running, simply click on the Cancel Query button.
+
+
+
+
Cancel will display in the Query Status view.
+
+
+
+
+
+
Saving a Query
+
+
A previous query () is created automatically when the query is
+ run from the Temporal Query Tool. The query is stored and displayed in the
+ Previous Query View. Temporal Query Tool does not currently support
+ saving query definitions.
+
+
Note: Previous
+ queries can also be seen in Workplace View if the user copied it to their workplace
+ or shared folder in workplace view.
+
+
1. Run a query.
+
+
2. Go to the Previous Query View.
+
+
3.
+ The query you just ran will now appear in the list of previous queries.
+
+
+
+
+
Printing a Query
+
Users are able to print out the query information if they wish to have a hard copy of the search criteria defined for a query.
+
+
When printing a query you can either print the information for a current query or
+ you can drag a previous query to the query tool view and print the information
+ associated with that query.
+
The following steps outline the process of printing a query once you have the
+ appropriate query in the Query Tool.
+
+
Click on the Print Query button located on the toolbar at the bottom of the Query Tool view
+
+
+
A new window will open displaying the information about the query.
+
+
+
+
On the menu bar, click on File to display the menu options.
+
+
Select Print from the menu.
+
+
+
+
diff --git a/i2b2 license 2.1-1159.txt b/i2b2 license 2.1-1159.txt
index afa7cdcc..c0afeb6d 100755
--- a/i2b2 license 2.1-1159.txt
+++ b/i2b2 license 2.1-1159.txt
@@ -1,56 +1,56 @@
-
-i2b2 Software License ("Software License")
-Version 2.1 - 1/15/2009
-
-
- This Software License covers downloads from the i2b2 project ("i2b2") maintained by the Brigham and Women's Hospital, Inc. ("BWH").
-
- Your downloading, copying, modifying, displaying, distributing or use of any software and/or data from i2b2 (collectively, the "Software") constitutes acceptance of all of the terms and conditions of this Software License. If you do not agree to such terms and conditions, you have no right to download, copy, modify, display, distribute or use the Software.
-
-
-1. As used in this Software License, "you" means the individual downloading and/or using, reproducing, modifying, displaying and/or distributing the Software and the institution or entity which employs or is otherwise affiliated with such individual in connection therewith. The BWH hereby grants you, with right to sublicense, with respect to BWH's rights in the software, and related technical data, if any, which is the subject of this Software License, a royalty-free, non-exclusive license to use, reproduce, make derivative works of, display and distribute the Software, provided that:
-
-(a) You accept and adhere to all of the terms and conditions of this Software License;
-
-(b) In connection with any copy of or sublicense of all or any portion of the Software, all of the terms and conditions in this Software License shall appear in and shall apply to such copy and such sublicensee, including without limitation all source and executable forms and on any user documentation, prefaced with the following words: "All or portions of this licensed product (such portions are the "Software") have been obtained under license from The Brigham and Women's Hospital, Inc. and are subject to the following terms and conditions:"
-
-(c) You preserve and maintain all applicable attributions, copyright notices and licenses included in or applicable to the Software.
-
-
-
-2. Modifications to the Software shall mean any addition to or deletion from the substance or structure of either the Software or any previous Modifications. When Software is released as a series of files, a Modification is: (i) any addition to or deletion from the contents of a file containing the Software or previous Modifications; or (ii) any new file that contains any part of the Software or previous Modifications.
-
-(a) You agree that you will deliver, and you will cause all sublicensees to deliver, to BWH copies of all Modifications that are made to the Software, on or before the date on which the Modifications are distributed to any third party, and you hereby grant to BWH, and will cause all of your sublicensees to grant to BWH, a non-exclusive, royalty-free, irrevocable, non-terminable license to use, reproduce, make derivative works of, display, perform, and distribute any and all Modifications in source code and binary code form for any purpose and to sublicense such rights to others.
-
-(b) You agree that all Modifications of the Software must be clearly identified and marked as such, and must not be misrepresented as being the original Software.
-
-(c) You agree to consider making, but are under no obligation to make, the source code of any of your Modifications to the Software freely available to others on an open source basis.
-
-
-
-3. The license granted under this Software License includes without limitation the right to (i)incorporate the Software into proprietary programs (subject to any restrictions applicable to such programs), (ii)add your own copyright statement to your Modifications of the Software, and (iii)provide additional or different license terms and conditions in your sublicenses of Modifications of the Software; provided that in each case your use, reproduction or distribution of such modifications otherwise complies with the conditions stated in this Software License.
-
-
-4. This Software License does not grant any rights with respect to third party software, except those rights that BWH has been authorized by a third party to grant to you, and accordingly you are solely responsible for (i) obtaining any permissions from third parties that you need to use, reproduce, make derivative works of, display and distribute the Software, and (ii) informing your sublicensees, including without limitation your end-users, of their obligations to secure any such required permissions.
-
-
-5. The Software has been designed for research purposes only and has not been reviewed or approved by the Food and Drug Administration or by any other agency. YOU ACKNOWLEDGE AND AGREE THAT CLINICAL APPLICATIONS ARE NEITHER RECOMMENDED NOR ADVISED. Any commercialization of the Software is at the sole risk of the party or parties engaged in such commercialization. You further agree to use, reproduce, make derivative works of, display and distribute the Software in compliance with all applicable governmental laws, regulations and orders, including without limitation those relating to export and import control.
-
-
-6. The Software is provided "AS IS" and neither BWH nor any contributor to the software (each a "Contributor") shall have any obligation to provide maintenance, support, updates, enhancements or modifications thereto. You acknowledge and agree that you are responsible for your selection, testing, modification, use and distribution of the Software, in any form, and that you hereby expressly waive any claim for any loss, damage, or injury that may occur as a result of your use or distribution of the Software. You agree that you are responsible for obtaining and will maintain insurance providing coverage (including but not limited to general liability and product liability insurance) that is appropriate in light of the waivers and assumptions of liability set forth in this Software License. You furthermore waive any right of recovery against BWH or any Contributor (including any right of subrogation against BWH or any Contributor or any insurer of BWH or any Contributor) for loss or damage arising out of or incident to your use or distribution of the Software.
-
-7. BWH AND ALL CONTRIBUTORS SPECIFICALLY DISCLAIM ALL EXPRESS AND IMPLIED WARRANTIES OF ANY KIND INCLUDING, BUT NOT LIMITED TO, ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL BWH OR ANY CONTRIBUTOR BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY ARISING IN ANY WAY RELATED TO THE SOFTWARE, EVEN IF BWH OR ANY CONTRIBUTOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. TO THE MAXIMUM EXTENT NOT PROHIBITED BY LAW OR REGULATION, YOU FURTHER ASSUME ALL LIABILITY FOR YOUR USE, REPRODUCTION, MAKING OF DERIVATIVE WORKS, DISPLAY, LICENSE OR DISTRIBUTION OF THE SOFTWARE AND AGREE TO INDEMNIFY AND HOLD HARMLESS BWH AND ALL CONTRIBUTORS (AND ALL RELATED INDIVIDUALS AND ENTITIES) FROM AND AGAINST ANY AND ALL CLAIMS, SUITS, ACTIONS, DEMANDS AND JUDGMENTS ARISING THEREFROM OR FROM ANY MODIFICATIONS OF THE SOFTWARE DELIVERED TO BWH HEREUNDER.
-
-
-8. None of the names, logos or trademarks of BWH or any of BWH's affiliates or any of the Contributors, or any funding agency, may be used to endorse or promote products produced in whole or in part by operation of the Software or derived from or based on the Software without specific prior written permission from the applicable party.
-
-
-9. Any use, reproduction or distribution of the Software which is not in accordance with this Software License shall automatically revoke all rights granted to you under this Software License and render Paragraphs 1 and 2 of this Software License null and void.
-
-
-10. This Software License does not grant any rights in or to any intellectual property owned by BWH or any Contributor except those rights expressly granted hereunder.
-
-
-Version 2.1 - 1/15/08
-
-
+
+i2b2 Software License ("Software License")
+Version 2.1 - 1/15/2009
+
+
+ This Software License covers downloads from the i2b2 project ("i2b2") maintained by the Brigham and Women's Hospital, Inc. ("BWH").
+
+ Your downloading, copying, modifying, displaying, distributing or use of any software and/or data from i2b2 (collectively, the "Software") constitutes acceptance of all of the terms and conditions of this Software License. If you do not agree to such terms and conditions, you have no right to download, copy, modify, display, distribute or use the Software.
+
+
+1. As used in this Software License, "you" means the individual downloading and/or using, reproducing, modifying, displaying and/or distributing the Software and the institution or entity which employs or is otherwise affiliated with such individual in connection therewith. The BWH hereby grants you, with right to sublicense, with respect to BWH's rights in the software, and related technical data, if any, which is the subject of this Software License, a royalty-free, non-exclusive license to use, reproduce, make derivative works of, display and distribute the Software, provided that:
+
+(a) You accept and adhere to all of the terms and conditions of this Software License;
+
+(b) In connection with any copy of or sublicense of all or any portion of the Software, all of the terms and conditions in this Software License shall appear in and shall apply to such copy and such sublicensee, including without limitation all source and executable forms and on any user documentation, prefaced with the following words: "All or portions of this licensed product (such portions are the "Software") have been obtained under license from The Brigham and Women's Hospital, Inc. and are subject to the following terms and conditions:"
+
+(c) You preserve and maintain all applicable attributions, copyright notices and licenses included in or applicable to the Software.
+
+
+
+2. Modifications to the Software shall mean any addition to or deletion from the substance or structure of either the Software or any previous Modifications. When Software is released as a series of files, a Modification is: (i) any addition to or deletion from the contents of a file containing the Software or previous Modifications; or (ii) any new file that contains any part of the Software or previous Modifications.
+
+(a) You agree that you will deliver, and you will cause all sublicensees to deliver, to BWH copies of all Modifications that are made to the Software, on or before the date on which the Modifications are distributed to any third party, and you hereby grant to BWH, and will cause all of your sublicensees to grant to BWH, a non-exclusive, royalty-free, irrevocable, non-terminable license to use, reproduce, make derivative works of, display, perform, and distribute any and all Modifications in source code and binary code form for any purpose and to sublicense such rights to others.
+
+(b) You agree that all Modifications of the Software must be clearly identified and marked as such, and must not be misrepresented as being the original Software.
+
+(c) You agree to consider making, but are under no obligation to make, the source code of any of your Modifications to the Software freely available to others on an open source basis.
+
+
+
+3. The license granted under this Software License includes without limitation the right to (i)incorporate the Software into proprietary programs (subject to any restrictions applicable to such programs), (ii)add your own copyright statement to your Modifications of the Software, and (iii)provide additional or different license terms and conditions in your sublicenses of Modifications of the Software; provided that in each case your use, reproduction or distribution of such modifications otherwise complies with the conditions stated in this Software License.
+
+
+4. This Software License does not grant any rights with respect to third party software, except those rights that BWH has been authorized by a third party to grant to you, and accordingly you are solely responsible for (i) obtaining any permissions from third parties that you need to use, reproduce, make derivative works of, display and distribute the Software, and (ii) informing your sublicensees, including without limitation your end-users, of their obligations to secure any such required permissions.
+
+
+5. The Software has been designed for research purposes only and has not been reviewed or approved by the Food and Drug Administration or by any other agency. YOU ACKNOWLEDGE AND AGREE THAT CLINICAL APPLICATIONS ARE NEITHER RECOMMENDED NOR ADVISED. Any commercialization of the Software is at the sole risk of the party or parties engaged in such commercialization. You further agree to use, reproduce, make derivative works of, display and distribute the Software in compliance with all applicable governmental laws, regulations and orders, including without limitation those relating to export and import control.
+
+
+6. The Software is provided "AS IS" and neither BWH nor any contributor to the software (each a "Contributor") shall have any obligation to provide maintenance, support, updates, enhancements or modifications thereto. You acknowledge and agree that you are responsible for your selection, testing, modification, use and distribution of the Software, in any form, and that you hereby expressly waive any claim for any loss, damage, or injury that may occur as a result of your use or distribution of the Software. You agree that you are responsible for obtaining and will maintain insurance providing coverage (including but not limited to general liability and product liability insurance) that is appropriate in light of the waivers and assumptions of liability set forth in this Software License. You furthermore waive any right of recovery against BWH or any Contributor (including any right of subrogation against BWH or any Contributor or any insurer of BWH or any Contributor) for loss or damage arising out of or incident to your use or distribution of the Software.
+
+7. BWH AND ALL CONTRIBUTORS SPECIFICALLY DISCLAIM ALL EXPRESS AND IMPLIED WARRANTIES OF ANY KIND INCLUDING, BUT NOT LIMITED TO, ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL BWH OR ANY CONTRIBUTOR BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY ARISING IN ANY WAY RELATED TO THE SOFTWARE, EVEN IF BWH OR ANY CONTRIBUTOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. TO THE MAXIMUM EXTENT NOT PROHIBITED BY LAW OR REGULATION, YOU FURTHER ASSUME ALL LIABILITY FOR YOUR USE, REPRODUCTION, MAKING OF DERIVATIVE WORKS, DISPLAY, LICENSE OR DISTRIBUTION OF THE SOFTWARE AND AGREE TO INDEMNIFY AND HOLD HARMLESS BWH AND ALL CONTRIBUTORS (AND ALL RELATED INDIVIDUALS AND ENTITIES) FROM AND AGAINST ANY AND ALL CLAIMS, SUITS, ACTIONS, DEMANDS AND JUDGMENTS ARISING THEREFROM OR FROM ANY MODIFICATIONS OF THE SOFTWARE DELIVERED TO BWH HEREUNDER.
+
+
+8. None of the names, logos or trademarks of BWH or any of BWH's affiliates or any of the Contributors, or any funding agency, may be used to endorse or promote products produced in whole or in part by operation of the Software or derived from or based on the Software without specific prior written permission from the applicable party.
+
+
+9. Any use, reproduction or distribution of the Software which is not in accordance with this Software License shall automatically revoke all rights granted to you under this Software License and render Paragraphs 1 and 2 of this Software License null and void.
+
+
+10. This Software License does not grant any rights in or to any intellectual property owned by BWH or any Contributor except those rights expressly granted hereunder.
+
+
+Version 2.1 - 1/15/08
+
+
diff --git a/index.php b/index.php
index f5ac3004..aa471fe3 100755
--- a/index.php
+++ b/index.php
@@ -1,211 +1,211 @@
- tag
- $startPos = strpos($PostBody,"") + 14;
- $endPos = strpos($PostBody,"", $startPos);
- $proxyURL = substr($PostBody, $startPos, ($endPos - $startPos));
- $newXML = $PostBody;
-
- if ($pmCheckAllRequests)
- {
- error_log("Searhing for Security in " . $PostBody);
- //Validate that user is valid against known PM
-
- preg_match("/(.*)?<\/security>/", $PostBody, $proxySecurity);
-
- error_log("My Security is " . $proxySecurity[1]);
- preg_match("/(.*)?<\/domain>/", $proxySecurity[0], $proxyDomain);
- preg_match("/(.*)?<\/username>/", $proxySecurity[0], $proxyUsername);
- preg_match("/(.*)?<\/password>/", $proxySecurity[0], $proxyPassword);
-
- $checkPMXML = "1.12.4i2b2 Project Management1.1i2b2 HiveProject Management Cell1.1i2b2 Hive2007-04-09T15:19:18.906-04:00 " . $proxyDomain[0] . $proxyUsername[0] . $proxyPassword[0] . " 0qazI4rX6SDlQlk46wqQ30PIALALUSundefined180000undefined";
- // Process the POST for proxy redirection
-
-
-
- error_log($checkPMXML,0 );
- error_log("My proxy: " . $proxyURL, 0);
-
- }
-
- // ---------------------------------------------------
- // white-list processing on the URL
- // ---------------------------------------------------
- $isAllowed = false;
- $requestedURL = strtoupper($proxyURL);
- foreach ($WHITELIST as $entryValue) {
- $checkValue = strtoupper(substr($requestedURL, 0, strlen($entryValue)));
- if ($checkValue == strtoupper($entryValue)) {
- $isAllowed = true;
- break;
- }
- }
- if (!$isAllowed) {
- // security as failed - exit here and don't allow one more line of execution the opportunity to reverse this
- die("The proxy has refused to relay your request.");
- }
- // ---------------------------------------------------
- // black-list processing on the URL
- // ---------------------------------------------------
- foreach ($BLACKLIST as $entryValue) {
- $checkValue = strtoupper(substr($requestedURL, 0, strlen($entryValue)));
- if ($checkValue == strtoupper($entryValue)) {
- // security as failed - exit here and don't allow one more line of execution the opportunity to reverse this
- die("The proxy has refused to relay your request.");
- }
- }
-
-
-
- if ($pmCheckAllRequests) {
- // open the URL and forward the new XML in the POST body
- $proxyRequest = curl_init($pmURL);
-
- // these options are set for hyper-vigilance purposes
- curl_setopt($proxyRequest, CURLOPT_COOKIESESSION, 0);
- curl_setopt($proxyRequest, CURLOPT_FORBID_REUSE, 1);
- curl_setopt($proxyRequest, CURLOPT_FRESH_CONNECT, 0);
- // Specify NIC to use for outgoing connection, fixes firewall+DMZ headaches
- // curl_setopt($proxyRequest, CURLOPT_INTERFACE, "XXX.XXX.XXX.XXX");
- // other options
- curl_setopt($proxyRequest, CURLOPT_RETURNTRANSFER, 1);
- curl_setopt($proxyRequest, CURLOPT_CONNECTTIMEOUT, 900); // wait 15 minutes
- // data to proxy thru
- curl_setopt($proxyRequest, CURLOPT_POST, 1);
- curl_setopt($proxyRequest, CURLOPT_POSTFIELDS, $checkPMXML);
- // SEND REQUEST!!!
- curl_setopt($proxyRequest, CURLOPT_HTTPHEADER, array('Expect:', 'Content-Type: text/xml'));
- $proxyResult = curl_exec($proxyRequest);
- // cleanup cURL connection
- curl_close($proxyRequest);
- error_log("My PM Result " . $proxyResult);
-
-
- $pattern = "//i";
- //Check if request is valid
- if (preg_match($pattern, $proxyResult)) {
- error_log("Local PM denied request");
- die("Local PM server could not validate the request.");
- }
-
- }
-
-
- // open the URL and forward the new XML in the POST body
- $proxyRequest = curl_init($proxyURL);
-
- curl_setopt($proxyRequest, CURLOPT_SSL_VERIFYPEER, FALSE);
- // these options are set for hyper-vigilance purposes
- curl_setopt($proxyRequest, CURLOPT_COOKIESESSION, 0);
- curl_setopt($proxyRequest, CURLOPT_FORBID_REUSE, 1);
- curl_setopt($proxyRequest, CURLOPT_FRESH_CONNECT, 0);
- // Specify NIC to use for outgoing connection, fixes firewall+DMZ headaches
- // curl_setopt($proxyRequest, CURLOPT_INTERFACE, "XXX.XXX.XXX.XXX");
- // other options
- curl_setopt($proxyRequest, CURLOPT_RETURNTRANSFER, 1);
- curl_setopt($proxyRequest, CURLOPT_CONNECTTIMEOUT, 900); // wait 15 minutes
- // data to proxy thru
- curl_setopt($proxyRequest, CURLOPT_POST, 1);
- curl_setopt($proxyRequest, CURLOPT_POSTFIELDS, $newXML);
- // SEND REQUEST!!!
- curl_setopt($proxyRequest, CURLOPT_HTTPHEADER, array('Expect:', 'Content-Type: text/xml'));
- $proxyResult = curl_exec($proxyRequest);
- // cleanup cURL connection
- curl_close($proxyRequest);
-
-
- // perform any analysis or processing on the returned result here
- header("Content-Type: text/xml", true);
- print($proxyResult);
-
-}
-
-
-?>
+ tag
+ $startPos = strpos($PostBody,"") + 14;
+ $endPos = strpos($PostBody,"", $startPos);
+ $proxyURL = substr($PostBody, $startPos, ($endPos - $startPos));
+ $newXML = $PostBody;
+
+ if ($pmCheckAllRequests)
+ {
+ error_log("Searhing for Security in " . $PostBody);
+ //Validate that user is valid against known PM
+
+ preg_match("/(.*)?<\/security>/", $PostBody, $proxySecurity);
+
+ error_log("My Security is " . $proxySecurity[1]);
+ preg_match("/(.*)?<\/domain>/", $proxySecurity[0], $proxyDomain);
+ preg_match("/(.*)?<\/username>/", $proxySecurity[0], $proxyUsername);
+ preg_match("/(.*)?<\/password>/", $proxySecurity[0], $proxyPassword);
+
+ $checkPMXML = "1.12.4i2b2 Project Management1.1i2b2 HiveProject Management Cell1.1i2b2 Hive2007-04-09T15:19:18.906-04:00 " . $proxyDomain[0] . $proxyUsername[0] . $proxyPassword[0] . " 0qazI4rX6SDlQlk46wqQ30PIALALUSundefined180000undefined";
+ // Process the POST for proxy redirection
+
+
+
+ error_log($checkPMXML,0 );
+ error_log("My proxy: " . $proxyURL, 0);
+
+ }
+
+ // ---------------------------------------------------
+ // white-list processing on the URL
+ // ---------------------------------------------------
+ $isAllowed = false;
+ $requestedURL = strtoupper($proxyURL);
+ foreach ($WHITELIST as $entryValue) {
+ $checkValue = strtoupper(substr($requestedURL, 0, strlen($entryValue)));
+ if ($checkValue == strtoupper($entryValue)) {
+ $isAllowed = true;
+ break;
+ }
+ }
+ if (!$isAllowed) {
+ // security as failed - exit here and don't allow one more line of execution the opportunity to reverse this
+ die("The proxy has refused to relay your request.");
+ }
+ // ---------------------------------------------------
+ // black-list processing on the URL
+ // ---------------------------------------------------
+ foreach ($BLACKLIST as $entryValue) {
+ $checkValue = strtoupper(substr($requestedURL, 0, strlen($entryValue)));
+ if ($checkValue == strtoupper($entryValue)) {
+ // security as failed - exit here and don't allow one more line of execution the opportunity to reverse this
+ die("The proxy has refused to relay your request.");
+ }
+ }
+
+
+
+ if ($pmCheckAllRequests) {
+ // open the URL and forward the new XML in the POST body
+ $proxyRequest = curl_init($pmURL);
+
+ // these options are set for hyper-vigilance purposes
+ curl_setopt($proxyRequest, CURLOPT_COOKIESESSION, 0);
+ curl_setopt($proxyRequest, CURLOPT_FORBID_REUSE, 1);
+ curl_setopt($proxyRequest, CURLOPT_FRESH_CONNECT, 0);
+ // Specify NIC to use for outgoing connection, fixes firewall+DMZ headaches
+ // curl_setopt($proxyRequest, CURLOPT_INTERFACE, "XXX.XXX.XXX.XXX");
+ // other options
+ curl_setopt($proxyRequest, CURLOPT_RETURNTRANSFER, 1);
+ curl_setopt($proxyRequest, CURLOPT_CONNECTTIMEOUT, 900); // wait 15 minutes
+ // data to proxy thru
+ curl_setopt($proxyRequest, CURLOPT_POST, 1);
+ curl_setopt($proxyRequest, CURLOPT_POSTFIELDS, $checkPMXML);
+ // SEND REQUEST!!!
+ curl_setopt($proxyRequest, CURLOPT_HTTPHEADER, array('Expect:', 'Content-Type: text/xml'));
+ $proxyResult = curl_exec($proxyRequest);
+ // cleanup cURL connection
+ curl_close($proxyRequest);
+ error_log("My PM Result " . $proxyResult);
+
+
+ $pattern = "//i";
+ //Check if request is valid
+ if (preg_match($pattern, $proxyResult)) {
+ error_log("Local PM denied request");
+ die("Local PM server could not validate the request.");
+ }
+
+ }
+
+
+ // open the URL and forward the new XML in the POST body
+ $proxyRequest = curl_init($proxyURL);
+
+ curl_setopt($proxyRequest, CURLOPT_SSL_VERIFYPEER, FALSE);
+ // these options are set for hyper-vigilance purposes
+ curl_setopt($proxyRequest, CURLOPT_COOKIESESSION, 0);
+ curl_setopt($proxyRequest, CURLOPT_FORBID_REUSE, 1);
+ curl_setopt($proxyRequest, CURLOPT_FRESH_CONNECT, 0);
+ // Specify NIC to use for outgoing connection, fixes firewall+DMZ headaches
+ // curl_setopt($proxyRequest, CURLOPT_INTERFACE, "XXX.XXX.XXX.XXX");
+ // other options
+ curl_setopt($proxyRequest, CURLOPT_RETURNTRANSFER, 1);
+ curl_setopt($proxyRequest, CURLOPT_CONNECTTIMEOUT, 900); // wait 15 minutes
+ // data to proxy thru
+ curl_setopt($proxyRequest, CURLOPT_POST, 1);
+ curl_setopt($proxyRequest, CURLOPT_POSTFIELDS, $newXML);
+ // SEND REQUEST!!!
+ curl_setopt($proxyRequest, CURLOPT_HTTPHEADER, array('Expect:', 'Content-Type: text/xml'));
+ $proxyResult = curl_exec($proxyRequest);
+ // cleanup cURL connection
+ curl_close($proxyRequest);
+
+
+ // perform any analysis or processing on the returned result here
+ header("Content-Type: text/xml", true);
+ print($proxyResult);
+
+}
+
+
+?>
diff --git a/js-ext/YUI_DataTable_MD5CellEditor.js b/js-ext/YUI_DataTable_MD5CellEditor.js
index bde302c8..34597876 100755
--- a/js-ext/YUI_DataTable_MD5CellEditor.js
+++ b/js-ext/YUI_DataTable_MD5CellEditor.js
@@ -1,532 +1,532 @@
-/**
- * MD5CellEditor
- * A YUI DataTable extension
- * Originally made by Mihaly Koles, http://koles.hu, 2009.02.10.
- * Original version: http://koles.hu/sandbox/yui_datatable_password/YUI_DataTable_MD5CellEditor.js
- */
-
-var Ev = YAHOO.util.Event,
- lang = YAHOO.lang,
- widget = YAHOO.widget,
- ua = YAHOO.env.ua;
-
-//Password field editor with two text inputs
-widget.MD5CellEditor = function(oConfigs) {
- this._sId = "yui-md5ceditor" + YAHOO.widget.BaseCellEditor._nCount++;
- widget.MD5CellEditor.superclass.constructor.call(this, "textbox", oConfigs);
-};
-
-lang.extend(widget.MD5CellEditor, widget.BaseCellEditor, {
- textbox0 : null,
- textbox1 : null,
- msgEl : null,
- renderForm : function() {
- var elTextbox0, elTextbox1, elForm;
- // Bug 1802582: SF3/Mac needs a form element wrapping the input
- if(ua.webkit>420) {
- elForm = this.getContainerEl().appendChild(document.createElement("form"))
- }
- else {
- elForm = this.getContainerEl();
- }
- elForm.style.textAlign="right";
- elForm.appendChild(document.createElement("label")).innerHTML="Key:";
- elTextbox0= document.createElement("input");
- // elTextbox0.type = "password";
- elForm.appendChild(elTextbox0);
- elForm.appendChild(document.createElement("br"));
- // elForm.appendChild(document.createElement("label")).innerHTML="Confirm:";
- // elTextbox1= document.createElement("input");
- // elTextbox1.type = "password";
- // elForm.appendChild(elTextbox1);
- // elForm.appendChild(document.createElement("br"));
- this.msgEl=elForm.appendChild(document.createElement("span"));
-
- this.textbox0 = elTextbox0;
- this.textbox0.value = "";
-
- // this.textbox1 = elTextbox1;
-
- // Save on enter by default
- // Bug: 1802582 Set up a listener on each textbox to track on keypress
- // since SF/OP can't preventDefault on keydown
- Ev.addListener(elTextbox0, "keyup", function(v){
- if (this.checkPasswords())
- {
- if((v.keyCode === 13)) {
- // Prevent form submit
- YAHOO.util.Event.preventDefault(v);
- this.save();
- }
- }
- }, this, true);
-
-// Ev.addListener(elTextbox1, "keyup", function(v){
-// if (this.checkPasswords())
-// {
-// if((v.keyCode === 13)) {
- // Prevent form submit
- // YAHOO.util.Event.preventDefault(v);
- // this.save();
- // }
- // }
- // }, this, true);
-
- if(this.disableBtns) {
- // By default this is no-op since enter saves by default
- this.handleDisabledBtns();
- }
- },
- checkPasswords : function()
- {
- if (this.textbox0.value==null
- || this.textbox0.value==""
- //|| this.textbox1.value==null
- //|| this.textbox1.value==""
- )
- {
- this.msgEl.innerHTML="";
- return false;
- }
- else {
-
- this.msgEl.innerHTML="New MD5 Key: " + hex_md5(this.textbox0.value).toLowerCase().substring(0,3);
- this.msgEl.style.color="#008000";
- return true;
-// if (this.textbox0.value == this.textbox1.value) {
- // this.msgEl.innerHTML="New password is confirmed.";
- // this.msgEl.style.color="#008000";
- // return true;
- // }
- // else {
- // this.msgEl.innerHTML="Password don't match!";
- // this.msgEl.style.color="#800000";
- // return false;
- // }
- }
- },
- move : function() {
- this.textbox0.style.width = this.getTdEl().offsetWidth + "px";
- // this.textbox1.style.width = this.getTdEl().offsetWidth + "px";
- widget.MD5CellEditor.superclass.move.call(this);
- },
- resetForm : function() {
- this.textbox0.value = ""; // lang.isValue(this.value) ? this.value.toString() : "";
- // this.textbox1.value = lang.isValue(this.value) ? this.value.toString() : "";
- },
- focus : function() {
- this.textbox0.focus();
- this.textbox0.select();
- },
- handleDisabledBtns : function() {
- this.subscribe("blurEvent", function(v){
- if (this.checkPasswords()) {
- // Save on blur
- this.save();
- }
- }, this, true);
- },
- getInputValue : function() {
- if (this.checkPasswords()) return hex_md5(this.textbox0.value).toLowerCase().substring(0,3); //this.textbox0.value;
- else return "";
- }
-});
-
-// Copy static members to MD5CellEditor class
-lang.augmentObject(widget.MD5CellEditor, widget.BaseCellEditor);
-
-
-//cell formatter for password fields
-DataTableUtils={
- PasswordFormatter:function(el,oRecord,oColumn,oData){
- if (oData==null || oData=='') oData='xxxxxxxx';
- {
- el.innerHTML='';
- var oStr = new String(oData);
- for (var i=0; i 16) bkey = binl_md5(bkey, key.length * 8);
-
- var ipad = Array(16), opad = Array(16);
- for(var i = 0; i < 16; i++)
- {
- ipad[i] = bkey[i] ^ 0x36363636;
- opad[i] = bkey[i] ^ 0x5C5C5C5C;
- }
-
- var hash = binl_md5(ipad.concat(rstr2binl(data)), 512 + data.length * 8);
- return binl2rstr(binl_md5(opad.concat(hash), 512 + 128));
-}
-
-/*
- * Convert a raw string to a hex string
- */
-function rstr2hex(input)
-{
- try { hexcase } catch(e) { hexcase=0; }
- var hex_tab = hexcase ? "0123456789ABCDEF" : "0123456789abcdef";
- var output = "";
- var x;
- for(var i = 0; i < input.length; i++)
- {
- x = input.charCodeAt(i);
- output += hex_tab.charAt((x >>> 4) & 0x0F)
- + hex_tab.charAt( x & 0x0F);
- }
- return output;
-}
-
-/*
- * Convert a raw string to a base-64 string
- */
-function rstr2b64(input)
-{
- try { b64pad } catch(e) { b64pad=''; }
- var tab = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
- var output = "";
- var len = input.length;
- for(var i = 0; i < len; i += 3)
- {
- var triplet = (input.charCodeAt(i) << 16)
- | (i + 1 < len ? input.charCodeAt(i+1) << 8 : 0)
- | (i + 2 < len ? input.charCodeAt(i+2) : 0);
- for(var j = 0; j < 4; j++)
- {
- if(i * 8 + j * 6 > input.length * 8) output += b64pad;
- else output += tab.charAt((triplet >>> 6*(3-j)) & 0x3F);
- }
- }
- return output;
-}
-
-/*
- * Convert a raw string to an arbitrary string encoding
- */
-function rstr2any(input, encoding)
-{
- var divisor = encoding.length;
- var i, j, q, x, quotient;
-
- /* Convert to an array of 16-bit big-endian values, forming the dividend */
- var dividend = Array(Math.ceil(input.length / 2));
- for(i = 0; i < dividend.length; i++)
- {
- dividend[i] = (input.charCodeAt(i * 2) << 8) | input.charCodeAt(i * 2 + 1);
- }
-
- /*
- * Repeatedly perform a long division. The binary array forms the dividend,
- * the length of the encoding is the divisor. Once computed, the quotient
- * forms the dividend for the next step. All remainders are stored for later
- * use.
- */
- var full_length = Math.ceil(input.length * 8 /
- (Math.log(encoding.length) / Math.log(2)));
- var remainders = Array(full_length);
- for(j = 0; j < full_length; j++)
- {
- quotient = Array();
- x = 0;
- for(i = 0; i < dividend.length; i++)
- {
- x = (x << 16) + dividend[i];
- q = Math.floor(x / divisor);
- x -= q * divisor;
- if(quotient.length > 0 || q > 0)
- quotient[quotient.length] = q;
- }
- remainders[j] = x;
- dividend = quotient;
- }
-
- /* Convert the remainders to the output string */
- var output = "";
- for(i = remainders.length - 1; i >= 0; i--)
- output += encoding.charAt(remainders[i]);
-
- return output;
-}
-
-/*
- * Encode a string as utf-8.
- * For efficiency, this assumes the input is valid utf-16.
- */
-function str2rstr_utf8(input)
-{
- var output = "";
- var i = -1;
- var x, y;
-
- while(++i < input.length)
- {
- /* Decode utf-16 surrogate pairs */
- x = input.charCodeAt(i);
- y = i + 1 < input.length ? input.charCodeAt(i + 1) : 0;
- if(0xD800 <= x && x <= 0xDBFF && 0xDC00 <= y && y <= 0xDFFF)
- {
- x = 0x10000 + ((x & 0x03FF) << 10) + (y & 0x03FF);
- i++;
- }
-
- /* Encode output as utf-8 */
- if(x <= 0x7F)
- output += String.fromCharCode(x);
- else if(x <= 0x7FF)
- output += String.fromCharCode(0xC0 | ((x >>> 6 ) & 0x1F),
- 0x80 | ( x & 0x3F));
- else if(x <= 0xFFFF)
- output += String.fromCharCode(0xE0 | ((x >>> 12) & 0x0F),
- 0x80 | ((x >>> 6 ) & 0x3F),
- 0x80 | ( x & 0x3F));
- else if(x <= 0x1FFFFF)
- output += String.fromCharCode(0xF0 | ((x >>> 18) & 0x07),
- 0x80 | ((x >>> 12) & 0x3F),
- 0x80 | ((x >>> 6 ) & 0x3F),
- 0x80 | ( x & 0x3F));
- }
- return output;
-}
-
-/*
- * Encode a string as utf-16
- */
-function str2rstr_utf16le(input)
-{
- var output = "";
- for(var i = 0; i < input.length; i++)
- output += String.fromCharCode( input.charCodeAt(i) & 0xFF,
- (input.charCodeAt(i) >>> 8) & 0xFF);
- return output;
-}
-
-function str2rstr_utf16be(input)
-{
- var output = "";
- for(var i = 0; i < input.length; i++)
- output += String.fromCharCode((input.charCodeAt(i) >>> 8) & 0xFF,
- input.charCodeAt(i) & 0xFF);
- return output;
-}
-
-/*
- * Convert a raw string to an array of little-endian words
- * Characters >255 have their high-byte silently ignored.
- */
-function rstr2binl(input)
-{
- var output = Array(input.length >> 2);
- for(var i = 0; i < output.length; i++)
- output[i] = 0;
- for(var i = 0; i < input.length * 8; i += 8)
- output[i>>5] |= (input.charCodeAt(i / 8) & 0xFF) << (i%32);
- return output;
-}
-
-/*
- * Convert an array of little-endian words to a string
- */
-function binl2rstr(input)
-{
- var output = "";
- for(var i = 0; i < input.length * 32; i += 8)
- output += String.fromCharCode((input[i>>5] >>> (i % 32)) & 0xFF);
- return output;
-}
-
-/*
- * Calculate the MD5 of an array of little-endian words, and a bit length.
- */
-function binl_md5(x, len)
-{
- /* append padding */
- x[len >> 5] |= 0x80 << ((len) % 32);
- x[(((len + 64) >>> 9) << 4) + 14] = len;
-
- var a = 1732584193;
- var b = -271733879;
- var c = -1732584194;
- var d = 271733878;
-
- for(var i = 0; i < x.length; i += 16)
- {
- var olda = a;
- var oldb = b;
- var oldc = c;
- var oldd = d;
-
- a = md5_ff(a, b, c, d, x[i+ 0], 7 , -680876936);
- d = md5_ff(d, a, b, c, x[i+ 1], 12, -389564586);
- c = md5_ff(c, d, a, b, x[i+ 2], 17, 606105819);
- b = md5_ff(b, c, d, a, x[i+ 3], 22, -1044525330);
- a = md5_ff(a, b, c, d, x[i+ 4], 7 , -176418897);
- d = md5_ff(d, a, b, c, x[i+ 5], 12, 1200080426);
- c = md5_ff(c, d, a, b, x[i+ 6], 17, -1473231341);
- b = md5_ff(b, c, d, a, x[i+ 7], 22, -45705983);
- a = md5_ff(a, b, c, d, x[i+ 8], 7 , 1770035416);
- d = md5_ff(d, a, b, c, x[i+ 9], 12, -1958414417);
- c = md5_ff(c, d, a, b, x[i+10], 17, -42063);
- b = md5_ff(b, c, d, a, x[i+11], 22, -1990404162);
- a = md5_ff(a, b, c, d, x[i+12], 7 , 1804603682);
- d = md5_ff(d, a, b, c, x[i+13], 12, -40341101);
- c = md5_ff(c, d, a, b, x[i+14], 17, -1502002290);
- b = md5_ff(b, c, d, a, x[i+15], 22, 1236535329);
-
- a = md5_gg(a, b, c, d, x[i+ 1], 5 , -165796510);
- d = md5_gg(d, a, b, c, x[i+ 6], 9 , -1069501632);
- c = md5_gg(c, d, a, b, x[i+11], 14, 643717713);
- b = md5_gg(b, c, d, a, x[i+ 0], 20, -373897302);
- a = md5_gg(a, b, c, d, x[i+ 5], 5 , -701558691);
- d = md5_gg(d, a, b, c, x[i+10], 9 , 38016083);
- c = md5_gg(c, d, a, b, x[i+15], 14, -660478335);
- b = md5_gg(b, c, d, a, x[i+ 4], 20, -405537848);
- a = md5_gg(a, b, c, d, x[i+ 9], 5 , 568446438);
- d = md5_gg(d, a, b, c, x[i+14], 9 , -1019803690);
- c = md5_gg(c, d, a, b, x[i+ 3], 14, -187363961);
- b = md5_gg(b, c, d, a, x[i+ 8], 20, 1163531501);
- a = md5_gg(a, b, c, d, x[i+13], 5 , -1444681467);
- d = md5_gg(d, a, b, c, x[i+ 2], 9 , -51403784);
- c = md5_gg(c, d, a, b, x[i+ 7], 14, 1735328473);
- b = md5_gg(b, c, d, a, x[i+12], 20, -1926607734);
-
- a = md5_hh(a, b, c, d, x[i+ 5], 4 , -378558);
- d = md5_hh(d, a, b, c, x[i+ 8], 11, -2022574463);
- c = md5_hh(c, d, a, b, x[i+11], 16, 1839030562);
- b = md5_hh(b, c, d, a, x[i+14], 23, -35309556);
- a = md5_hh(a, b, c, d, x[i+ 1], 4 , -1530992060);
- d = md5_hh(d, a, b, c, x[i+ 4], 11, 1272893353);
- c = md5_hh(c, d, a, b, x[i+ 7], 16, -155497632);
- b = md5_hh(b, c, d, a, x[i+10], 23, -1094730640);
- a = md5_hh(a, b, c, d, x[i+13], 4 , 681279174);
- d = md5_hh(d, a, b, c, x[i+ 0], 11, -358537222);
- c = md5_hh(c, d, a, b, x[i+ 3], 16, -722521979);
- b = md5_hh(b, c, d, a, x[i+ 6], 23, 76029189);
- a = md5_hh(a, b, c, d, x[i+ 9], 4 , -640364487);
- d = md5_hh(d, a, b, c, x[i+12], 11, -421815835);
- c = md5_hh(c, d, a, b, x[i+15], 16, 530742520);
- b = md5_hh(b, c, d, a, x[i+ 2], 23, -995338651);
-
- a = md5_ii(a, b, c, d, x[i+ 0], 6 , -198630844);
- d = md5_ii(d, a, b, c, x[i+ 7], 10, 1126891415);
- c = md5_ii(c, d, a, b, x[i+14], 15, -1416354905);
- b = md5_ii(b, c, d, a, x[i+ 5], 21, -57434055);
- a = md5_ii(a, b, c, d, x[i+12], 6 , 1700485571);
- d = md5_ii(d, a, b, c, x[i+ 3], 10, -1894986606);
- c = md5_ii(c, d, a, b, x[i+10], 15, -1051523);
- b = md5_ii(b, c, d, a, x[i+ 1], 21, -2054922799);
- a = md5_ii(a, b, c, d, x[i+ 8], 6 , 1873313359);
- d = md5_ii(d, a, b, c, x[i+15], 10, -30611744);
- c = md5_ii(c, d, a, b, x[i+ 6], 15, -1560198380);
- b = md5_ii(b, c, d, a, x[i+13], 21, 1309151649);
- a = md5_ii(a, b, c, d, x[i+ 4], 6 , -145523070);
- d = md5_ii(d, a, b, c, x[i+11], 10, -1120210379);
- c = md5_ii(c, d, a, b, x[i+ 2], 15, 718787259);
- b = md5_ii(b, c, d, a, x[i+ 9], 21, -343485551);
-
- a = safe_add(a, olda);
- b = safe_add(b, oldb);
- c = safe_add(c, oldc);
- d = safe_add(d, oldd);
- }
- return Array(a, b, c, d);
-}
-
-/*
- * These functions implement the four basic operations the algorithm uses.
- */
-function md5_cmn(q, a, b, x, s, t)
-{
- return safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s),b);
-}
-function md5_ff(a, b, c, d, x, s, t)
-{
- return md5_cmn((b & c) | ((~b) & d), a, b, x, s, t);
-}
-function md5_gg(a, b, c, d, x, s, t)
-{
- return md5_cmn((b & d) | (c & (~d)), a, b, x, s, t);
-}
-function md5_hh(a, b, c, d, x, s, t)
-{
- return md5_cmn(b ^ c ^ d, a, b, x, s, t);
-}
-function md5_ii(a, b, c, d, x, s, t)
-{
- return md5_cmn(c ^ (b | (~d)), a, b, x, s, t);
-}
-
-/*
- * Add integers, wrapping at 2^32. This uses 16-bit operations internally
- * to work around bugs in some JS interpreters.
- */
-function safe_add(x, y)
-{
- var lsw = (x & 0xFFFF) + (y & 0xFFFF);
- var msw = (x >> 16) + (y >> 16) + (lsw >> 16);
- return (msw << 16) | (lsw & 0xFFFF);
-}
-
-/*
- * Bitwise rotate a 32-bit number to the left.
- */
-function bit_rol(num, cnt)
-{
- return (num << cnt) | (num >>> (32 - cnt));
-}
+/**
+ * MD5CellEditor
+ * A YUI DataTable extension
+ * Originally made by Mihaly Koles, http://koles.hu, 2009.02.10.
+ * Original version: http://koles.hu/sandbox/yui_datatable_password/YUI_DataTable_MD5CellEditor.js
+ */
+
+var Ev = YAHOO.util.Event,
+ lang = YAHOO.lang,
+ widget = YAHOO.widget,
+ ua = YAHOO.env.ua;
+
+//Password field editor with two text inputs
+widget.MD5CellEditor = function(oConfigs) {
+ this._sId = "yui-md5ceditor" + YAHOO.widget.BaseCellEditor._nCount++;
+ widget.MD5CellEditor.superclass.constructor.call(this, "textbox", oConfigs);
+};
+
+lang.extend(widget.MD5CellEditor, widget.BaseCellEditor, {
+ textbox0 : null,
+ textbox1 : null,
+ msgEl : null,
+ renderForm : function() {
+ var elTextbox0, elTextbox1, elForm;
+ // Bug 1802582: SF3/Mac needs a form element wrapping the input
+ if(ua.webkit>420) {
+ elForm = this.getContainerEl().appendChild(document.createElement("form"))
+ }
+ else {
+ elForm = this.getContainerEl();
+ }
+ elForm.style.textAlign="right";
+ elForm.appendChild(document.createElement("label")).innerHTML="Key:";
+ elTextbox0= document.createElement("input");
+ // elTextbox0.type = "password";
+ elForm.appendChild(elTextbox0);
+ elForm.appendChild(document.createElement("br"));
+ // elForm.appendChild(document.createElement("label")).innerHTML="Confirm:";
+ // elTextbox1= document.createElement("input");
+ // elTextbox1.type = "password";
+ // elForm.appendChild(elTextbox1);
+ // elForm.appendChild(document.createElement("br"));
+ this.msgEl=elForm.appendChild(document.createElement("span"));
+
+ this.textbox0 = elTextbox0;
+ this.textbox0.value = "";
+
+ // this.textbox1 = elTextbox1;
+
+ // Save on enter by default
+ // Bug: 1802582 Set up a listener on each textbox to track on keypress
+ // since SF/OP can't preventDefault on keydown
+ Ev.addListener(elTextbox0, "keyup", function(v){
+ if (this.checkPasswords())
+ {
+ if((v.keyCode === 13)) {
+ // Prevent form submit
+ YAHOO.util.Event.preventDefault(v);
+ this.save();
+ }
+ }
+ }, this, true);
+
+// Ev.addListener(elTextbox1, "keyup", function(v){
+// if (this.checkPasswords())
+// {
+// if((v.keyCode === 13)) {
+ // Prevent form submit
+ // YAHOO.util.Event.preventDefault(v);
+ // this.save();
+ // }
+ // }
+ // }, this, true);
+
+ if(this.disableBtns) {
+ // By default this is no-op since enter saves by default
+ this.handleDisabledBtns();
+ }
+ },
+ checkPasswords : function()
+ {
+ if (this.textbox0.value==null
+ || this.textbox0.value==""
+ //|| this.textbox1.value==null
+ //|| this.textbox1.value==""
+ )
+ {
+ this.msgEl.innerHTML="";
+ return false;
+ }
+ else {
+
+ this.msgEl.innerHTML="New MD5 Key: " + hex_md5(this.textbox0.value).toLowerCase().substring(0,3);
+ this.msgEl.style.color="#008000";
+ return true;
+// if (this.textbox0.value == this.textbox1.value) {
+ // this.msgEl.innerHTML="New password is confirmed.";
+ // this.msgEl.style.color="#008000";
+ // return true;
+ // }
+ // else {
+ // this.msgEl.innerHTML="Password don't match!";
+ // this.msgEl.style.color="#800000";
+ // return false;
+ // }
+ }
+ },
+ move : function() {
+ this.textbox0.style.width = this.getTdEl().offsetWidth + "px";
+ // this.textbox1.style.width = this.getTdEl().offsetWidth + "px";
+ widget.MD5CellEditor.superclass.move.call(this);
+ },
+ resetForm : function() {
+ this.textbox0.value = ""; // lang.isValue(this.value) ? this.value.toString() : "";
+ // this.textbox1.value = lang.isValue(this.value) ? this.value.toString() : "";
+ },
+ focus : function() {
+ this.textbox0.focus();
+ this.textbox0.select();
+ },
+ handleDisabledBtns : function() {
+ this.subscribe("blurEvent", function(v){
+ if (this.checkPasswords()) {
+ // Save on blur
+ this.save();
+ }
+ }, this, true);
+ },
+ getInputValue : function() {
+ if (this.checkPasswords()) return hex_md5(this.textbox0.value).toLowerCase().substring(0,3); //this.textbox0.value;
+ else return "";
+ }
+});
+
+// Copy static members to MD5CellEditor class
+lang.augmentObject(widget.MD5CellEditor, widget.BaseCellEditor);
+
+
+//cell formatter for password fields
+DataTableUtils={
+ PasswordFormatter:function(el,oRecord,oColumn,oData){
+ if (oData==null || oData=='') oData='xxxxxxxx';
+ {
+ el.innerHTML='';
+ var oStr = new String(oData);
+ for (var i=0; i 16) bkey = binl_md5(bkey, key.length * 8);
+
+ var ipad = Array(16), opad = Array(16);
+ for(var i = 0; i < 16; i++)
+ {
+ ipad[i] = bkey[i] ^ 0x36363636;
+ opad[i] = bkey[i] ^ 0x5C5C5C5C;
+ }
+
+ var hash = binl_md5(ipad.concat(rstr2binl(data)), 512 + data.length * 8);
+ return binl2rstr(binl_md5(opad.concat(hash), 512 + 128));
+}
+
+/*
+ * Convert a raw string to a hex string
+ */
+function rstr2hex(input)
+{
+ try { hexcase } catch(e) { hexcase=0; }
+ var hex_tab = hexcase ? "0123456789ABCDEF" : "0123456789abcdef";
+ var output = "";
+ var x;
+ for(var i = 0; i < input.length; i++)
+ {
+ x = input.charCodeAt(i);
+ output += hex_tab.charAt((x >>> 4) & 0x0F)
+ + hex_tab.charAt( x & 0x0F);
+ }
+ return output;
+}
+
+/*
+ * Convert a raw string to a base-64 string
+ */
+function rstr2b64(input)
+{
+ try { b64pad } catch(e) { b64pad=''; }
+ var tab = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
+ var output = "";
+ var len = input.length;
+ for(var i = 0; i < len; i += 3)
+ {
+ var triplet = (input.charCodeAt(i) << 16)
+ | (i + 1 < len ? input.charCodeAt(i+1) << 8 : 0)
+ | (i + 2 < len ? input.charCodeAt(i+2) : 0);
+ for(var j = 0; j < 4; j++)
+ {
+ if(i * 8 + j * 6 > input.length * 8) output += b64pad;
+ else output += tab.charAt((triplet >>> 6*(3-j)) & 0x3F);
+ }
+ }
+ return output;
+}
+
+/*
+ * Convert a raw string to an arbitrary string encoding
+ */
+function rstr2any(input, encoding)
+{
+ var divisor = encoding.length;
+ var i, j, q, x, quotient;
+
+ /* Convert to an array of 16-bit big-endian values, forming the dividend */
+ var dividend = Array(Math.ceil(input.length / 2));
+ for(i = 0; i < dividend.length; i++)
+ {
+ dividend[i] = (input.charCodeAt(i * 2) << 8) | input.charCodeAt(i * 2 + 1);
+ }
+
+ /*
+ * Repeatedly perform a long division. The binary array forms the dividend,
+ * the length of the encoding is the divisor. Once computed, the quotient
+ * forms the dividend for the next step. All remainders are stored for later
+ * use.
+ */
+ var full_length = Math.ceil(input.length * 8 /
+ (Math.log(encoding.length) / Math.log(2)));
+ var remainders = Array(full_length);
+ for(j = 0; j < full_length; j++)
+ {
+ quotient = Array();
+ x = 0;
+ for(i = 0; i < dividend.length; i++)
+ {
+ x = (x << 16) + dividend[i];
+ q = Math.floor(x / divisor);
+ x -= q * divisor;
+ if(quotient.length > 0 || q > 0)
+ quotient[quotient.length] = q;
+ }
+ remainders[j] = x;
+ dividend = quotient;
+ }
+
+ /* Convert the remainders to the output string */
+ var output = "";
+ for(i = remainders.length - 1; i >= 0; i--)
+ output += encoding.charAt(remainders[i]);
+
+ return output;
+}
+
+/*
+ * Encode a string as utf-8.
+ * For efficiency, this assumes the input is valid utf-16.
+ */
+function str2rstr_utf8(input)
+{
+ var output = "";
+ var i = -1;
+ var x, y;
+
+ while(++i < input.length)
+ {
+ /* Decode utf-16 surrogate pairs */
+ x = input.charCodeAt(i);
+ y = i + 1 < input.length ? input.charCodeAt(i + 1) : 0;
+ if(0xD800 <= x && x <= 0xDBFF && 0xDC00 <= y && y <= 0xDFFF)
+ {
+ x = 0x10000 + ((x & 0x03FF) << 10) + (y & 0x03FF);
+ i++;
+ }
+
+ /* Encode output as utf-8 */
+ if(x <= 0x7F)
+ output += String.fromCharCode(x);
+ else if(x <= 0x7FF)
+ output += String.fromCharCode(0xC0 | ((x >>> 6 ) & 0x1F),
+ 0x80 | ( x & 0x3F));
+ else if(x <= 0xFFFF)
+ output += String.fromCharCode(0xE0 | ((x >>> 12) & 0x0F),
+ 0x80 | ((x >>> 6 ) & 0x3F),
+ 0x80 | ( x & 0x3F));
+ else if(x <= 0x1FFFFF)
+ output += String.fromCharCode(0xF0 | ((x >>> 18) & 0x07),
+ 0x80 | ((x >>> 12) & 0x3F),
+ 0x80 | ((x >>> 6 ) & 0x3F),
+ 0x80 | ( x & 0x3F));
+ }
+ return output;
+}
+
+/*
+ * Encode a string as utf-16
+ */
+function str2rstr_utf16le(input)
+{
+ var output = "";
+ for(var i = 0; i < input.length; i++)
+ output += String.fromCharCode( input.charCodeAt(i) & 0xFF,
+ (input.charCodeAt(i) >>> 8) & 0xFF);
+ return output;
+}
+
+function str2rstr_utf16be(input)
+{
+ var output = "";
+ for(var i = 0; i < input.length; i++)
+ output += String.fromCharCode((input.charCodeAt(i) >>> 8) & 0xFF,
+ input.charCodeAt(i) & 0xFF);
+ return output;
+}
+
+/*
+ * Convert a raw string to an array of little-endian words
+ * Characters >255 have their high-byte silently ignored.
+ */
+function rstr2binl(input)
+{
+ var output = Array(input.length >> 2);
+ for(var i = 0; i < output.length; i++)
+ output[i] = 0;
+ for(var i = 0; i < input.length * 8; i += 8)
+ output[i>>5] |= (input.charCodeAt(i / 8) & 0xFF) << (i%32);
+ return output;
+}
+
+/*
+ * Convert an array of little-endian words to a string
+ */
+function binl2rstr(input)
+{
+ var output = "";
+ for(var i = 0; i < input.length * 32; i += 8)
+ output += String.fromCharCode((input[i>>5] >>> (i % 32)) & 0xFF);
+ return output;
+}
+
+/*
+ * Calculate the MD5 of an array of little-endian words, and a bit length.
+ */
+function binl_md5(x, len)
+{
+ /* append padding */
+ x[len >> 5] |= 0x80 << ((len) % 32);
+ x[(((len + 64) >>> 9) << 4) + 14] = len;
+
+ var a = 1732584193;
+ var b = -271733879;
+ var c = -1732584194;
+ var d = 271733878;
+
+ for(var i = 0; i < x.length; i += 16)
+ {
+ var olda = a;
+ var oldb = b;
+ var oldc = c;
+ var oldd = d;
+
+ a = md5_ff(a, b, c, d, x[i+ 0], 7 , -680876936);
+ d = md5_ff(d, a, b, c, x[i+ 1], 12, -389564586);
+ c = md5_ff(c, d, a, b, x[i+ 2], 17, 606105819);
+ b = md5_ff(b, c, d, a, x[i+ 3], 22, -1044525330);
+ a = md5_ff(a, b, c, d, x[i+ 4], 7 , -176418897);
+ d = md5_ff(d, a, b, c, x[i+ 5], 12, 1200080426);
+ c = md5_ff(c, d, a, b, x[i+ 6], 17, -1473231341);
+ b = md5_ff(b, c, d, a, x[i+ 7], 22, -45705983);
+ a = md5_ff(a, b, c, d, x[i+ 8], 7 , 1770035416);
+ d = md5_ff(d, a, b, c, x[i+ 9], 12, -1958414417);
+ c = md5_ff(c, d, a, b, x[i+10], 17, -42063);
+ b = md5_ff(b, c, d, a, x[i+11], 22, -1990404162);
+ a = md5_ff(a, b, c, d, x[i+12], 7 , 1804603682);
+ d = md5_ff(d, a, b, c, x[i+13], 12, -40341101);
+ c = md5_ff(c, d, a, b, x[i+14], 17, -1502002290);
+ b = md5_ff(b, c, d, a, x[i+15], 22, 1236535329);
+
+ a = md5_gg(a, b, c, d, x[i+ 1], 5 , -165796510);
+ d = md5_gg(d, a, b, c, x[i+ 6], 9 , -1069501632);
+ c = md5_gg(c, d, a, b, x[i+11], 14, 643717713);
+ b = md5_gg(b, c, d, a, x[i+ 0], 20, -373897302);
+ a = md5_gg(a, b, c, d, x[i+ 5], 5 , -701558691);
+ d = md5_gg(d, a, b, c, x[i+10], 9 , 38016083);
+ c = md5_gg(c, d, a, b, x[i+15], 14, -660478335);
+ b = md5_gg(b, c, d, a, x[i+ 4], 20, -405537848);
+ a = md5_gg(a, b, c, d, x[i+ 9], 5 , 568446438);
+ d = md5_gg(d, a, b, c, x[i+14], 9 , -1019803690);
+ c = md5_gg(c, d, a, b, x[i+ 3], 14, -187363961);
+ b = md5_gg(b, c, d, a, x[i+ 8], 20, 1163531501);
+ a = md5_gg(a, b, c, d, x[i+13], 5 , -1444681467);
+ d = md5_gg(d, a, b, c, x[i+ 2], 9 , -51403784);
+ c = md5_gg(c, d, a, b, x[i+ 7], 14, 1735328473);
+ b = md5_gg(b, c, d, a, x[i+12], 20, -1926607734);
+
+ a = md5_hh(a, b, c, d, x[i+ 5], 4 , -378558);
+ d = md5_hh(d, a, b, c, x[i+ 8], 11, -2022574463);
+ c = md5_hh(c, d, a, b, x[i+11], 16, 1839030562);
+ b = md5_hh(b, c, d, a, x[i+14], 23, -35309556);
+ a = md5_hh(a, b, c, d, x[i+ 1], 4 , -1530992060);
+ d = md5_hh(d, a, b, c, x[i+ 4], 11, 1272893353);
+ c = md5_hh(c, d, a, b, x[i+ 7], 16, -155497632);
+ b = md5_hh(b, c, d, a, x[i+10], 23, -1094730640);
+ a = md5_hh(a, b, c, d, x[i+13], 4 , 681279174);
+ d = md5_hh(d, a, b, c, x[i+ 0], 11, -358537222);
+ c = md5_hh(c, d, a, b, x[i+ 3], 16, -722521979);
+ b = md5_hh(b, c, d, a, x[i+ 6], 23, 76029189);
+ a = md5_hh(a, b, c, d, x[i+ 9], 4 , -640364487);
+ d = md5_hh(d, a, b, c, x[i+12], 11, -421815835);
+ c = md5_hh(c, d, a, b, x[i+15], 16, 530742520);
+ b = md5_hh(b, c, d, a, x[i+ 2], 23, -995338651);
+
+ a = md5_ii(a, b, c, d, x[i+ 0], 6 , -198630844);
+ d = md5_ii(d, a, b, c, x[i+ 7], 10, 1126891415);
+ c = md5_ii(c, d, a, b, x[i+14], 15, -1416354905);
+ b = md5_ii(b, c, d, a, x[i+ 5], 21, -57434055);
+ a = md5_ii(a, b, c, d, x[i+12], 6 , 1700485571);
+ d = md5_ii(d, a, b, c, x[i+ 3], 10, -1894986606);
+ c = md5_ii(c, d, a, b, x[i+10], 15, -1051523);
+ b = md5_ii(b, c, d, a, x[i+ 1], 21, -2054922799);
+ a = md5_ii(a, b, c, d, x[i+ 8], 6 , 1873313359);
+ d = md5_ii(d, a, b, c, x[i+15], 10, -30611744);
+ c = md5_ii(c, d, a, b, x[i+ 6], 15, -1560198380);
+ b = md5_ii(b, c, d, a, x[i+13], 21, 1309151649);
+ a = md5_ii(a, b, c, d, x[i+ 4], 6 , -145523070);
+ d = md5_ii(d, a, b, c, x[i+11], 10, -1120210379);
+ c = md5_ii(c, d, a, b, x[i+ 2], 15, 718787259);
+ b = md5_ii(b, c, d, a, x[i+ 9], 21, -343485551);
+
+ a = safe_add(a, olda);
+ b = safe_add(b, oldb);
+ c = safe_add(c, oldc);
+ d = safe_add(d, oldd);
+ }
+ return Array(a, b, c, d);
+}
+
+/*
+ * These functions implement the four basic operations the algorithm uses.
+ */
+function md5_cmn(q, a, b, x, s, t)
+{
+ return safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s),b);
+}
+function md5_ff(a, b, c, d, x, s, t)
+{
+ return md5_cmn((b & c) | ((~b) & d), a, b, x, s, t);
+}
+function md5_gg(a, b, c, d, x, s, t)
+{
+ return md5_cmn((b & d) | (c & (~d)), a, b, x, s, t);
+}
+function md5_hh(a, b, c, d, x, s, t)
+{
+ return md5_cmn(b ^ c ^ d, a, b, x, s, t);
+}
+function md5_ii(a, b, c, d, x, s, t)
+{
+ return md5_cmn(c ^ (b | (~d)), a, b, x, s, t);
+}
+
+/*
+ * Add integers, wrapping at 2^32. This uses 16-bit operations internally
+ * to work around bugs in some JS interpreters.
+ */
+function safe_add(x, y)
+{
+ var lsw = (x & 0xFFFF) + (y & 0xFFFF);
+ var msw = (x >> 16) + (y >> 16) + (lsw >> 16);
+ return (msw << 16) | (lsw & 0xFFFF);
+}
+
+/*
+ * Bitwise rotate a 32-bit number to the left.
+ */
+function bit_rol(num, cnt)
+{
+ return (num << cnt) | (num >>> (32 - cnt));
+}
diff --git a/js-ext/YUI_DataTable_PasswordCellEditor.js b/js-ext/YUI_DataTable_PasswordCellEditor.js
index 4f54ea4d..20566ca6 100755
--- a/js-ext/YUI_DataTable_PasswordCellEditor.js
+++ b/js-ext/YUI_DataTable_PasswordCellEditor.js
@@ -1,143 +1,143 @@
-/**
- * PasswordCellEditor
- * A YUI DataTable extension
- * Originally made by Mihaly Koles, http://koles.hu, 2009.02.10.
- * Original version: http://koles.hu/sandbox/yui_datatable_password/YUI_DataTable_PasswordCellEditor.js
- */
-
-var Ev = YAHOO.util.Event,
- lang = YAHOO.lang,
- widget = YAHOO.widget,
- ua = YAHOO.env.ua;
-
-//Password field editor with two text inputs
-widget.PasswordCellEditor = function(oConfigs) {
- this._sId = "yui-passwordceditor" + YAHOO.widget.BaseCellEditor._nCount++;
- widget.PasswordCellEditor.superclass.constructor.call(this, "textbox", oConfigs);
-};
-
-lang.extend(widget.PasswordCellEditor, widget.BaseCellEditor, {
- textbox0 : null,
- textbox1 : null,
- msgEl : null,
- renderForm : function() {
- var elTextbox0, elTextbox1, elForm;
- // Bug 1802582: SF3/Mac needs a form element wrapping the input
- if(ua.webkit>420) {
- elForm = this.getContainerEl().appendChild(document.createElement("form"))
- }
- else {
- elForm = this.getContainerEl();
- }
- elForm.style.textAlign="right";
- elForm.appendChild(document.createElement("label")).innerHTML="Password:";
- elTextbox0= document.createElement("input");
- elTextbox0.type = "password";
- elForm.appendChild(elTextbox0);
- elForm.appendChild(document.createElement("br"));
- elForm.appendChild(document.createElement("label")).innerHTML="Confirm:";
- elTextbox1= document.createElement("input");
- elTextbox1.type = "password";
- elForm.appendChild(elTextbox1);
- elForm.appendChild(document.createElement("br"));
- this.msgEl=elForm.appendChild(document.createElement("span"));
-
- this.textbox0 = elTextbox0;
- this.textbox1 = elTextbox1;
-
- // Save on enter by default
- // Bug: 1802582 Set up a listener on each textbox to track on keypress
- // since SF/OP can't preventDefault on keydown
- Ev.addListener(elTextbox0, "keyup", function(v){
- if (this.checkPasswords())
- {
- if((v.keyCode === 13)) {
- // Prevent form submit
- YAHOO.util.Event.preventDefault(v);
- this.save();
- }
- }
- }, this, true);
-
- Ev.addListener(elTextbox1, "keyup", function(v){
- if (this.checkPasswords())
- {
- if((v.keyCode === 13)) {
- // Prevent form submit
- YAHOO.util.Event.preventDefault(v);
- this.save();
- }
- }
- }, this, true);
-
- if(this.disableBtns) {
- // By default this is no-op since enter saves by default
- this.handleDisabledBtns();
- }
- },
- checkPasswords : function()
- {
- if (this.textbox0.value==null
- || this.textbox0.value==""
- || this.textbox1.value==null
- || this.textbox1.value=="")
- {
- this.msgEl.innerHTML="";
- return false;
- }
- else {
- if (this.textbox0.value == this.textbox1.value) {
- this.msgEl.innerHTML="New password is confirmed.";
- this.msgEl.style.color="#008000";
- return true;
- }
- else {
- this.msgEl.innerHTML="Password don't match!";
- this.msgEl.style.color="#800000";
- return false;
- }
- }
- },
- move : function() {
- this.textbox0.style.width = this.getTdEl().offsetWidth + "px";
- this.textbox1.style.width = this.getTdEl().offsetWidth + "px";
- widget.PasswordCellEditor.superclass.move.call(this);
- },
- resetForm : function() {
- this.textbox0.value = lang.isValue(this.value) ? this.value.toString() : "";
- this.textbox1.value = lang.isValue(this.value) ? this.value.toString() : "";
- },
- focus : function() {
- this.textbox0.focus();
- this.textbox0.select();
- },
- handleDisabledBtns : function() {
- this.subscribe("blurEvent", function(v){
- if (this.checkPasswords()) {
- // Save on blur
- this.save();
- }
- }, this, true);
- },
- getInputValue : function() {
- if (this.checkPasswords()) return this.textbox0.value;
- else return "";
- }
-});
-
-// Copy static members to PasswordCellEditor class
-lang.augmentObject(widget.PasswordCellEditor, widget.BaseCellEditor);
-
-
-//cell formatter for password fields
-DataTableUtils={
- PasswordFormatter:function(el,oRecord,oColumn,oData){
- if (oData==null || oData=='') oData='xxxxxxxx';
- {
- el.innerHTML='';
- var oStr = new String(oData);
- for (var i=0; i420) {
+ elForm = this.getContainerEl().appendChild(document.createElement("form"))
+ }
+ else {
+ elForm = this.getContainerEl();
+ }
+ elForm.style.textAlign="right";
+ elForm.appendChild(document.createElement("label")).innerHTML="Password:";
+ elTextbox0= document.createElement("input");
+ elTextbox0.type = "password";
+ elForm.appendChild(elTextbox0);
+ elForm.appendChild(document.createElement("br"));
+ elForm.appendChild(document.createElement("label")).innerHTML="Confirm:";
+ elTextbox1= document.createElement("input");
+ elTextbox1.type = "password";
+ elForm.appendChild(elTextbox1);
+ elForm.appendChild(document.createElement("br"));
+ this.msgEl=elForm.appendChild(document.createElement("span"));
+
+ this.textbox0 = elTextbox0;
+ this.textbox1 = elTextbox1;
+
+ // Save on enter by default
+ // Bug: 1802582 Set up a listener on each textbox to track on keypress
+ // since SF/OP can't preventDefault on keydown
+ Ev.addListener(elTextbox0, "keyup", function(v){
+ if (this.checkPasswords())
+ {
+ if((v.keyCode === 13)) {
+ // Prevent form submit
+ YAHOO.util.Event.preventDefault(v);
+ this.save();
+ }
+ }
+ }, this, true);
+
+ Ev.addListener(elTextbox1, "keyup", function(v){
+ if (this.checkPasswords())
+ {
+ if((v.keyCode === 13)) {
+ // Prevent form submit
+ YAHOO.util.Event.preventDefault(v);
+ this.save();
+ }
+ }
+ }, this, true);
+
+ if(this.disableBtns) {
+ // By default this is no-op since enter saves by default
+ this.handleDisabledBtns();
+ }
+ },
+ checkPasswords : function()
+ {
+ if (this.textbox0.value==null
+ || this.textbox0.value==""
+ || this.textbox1.value==null
+ || this.textbox1.value=="")
+ {
+ this.msgEl.innerHTML="";
+ return false;
+ }
+ else {
+ if (this.textbox0.value == this.textbox1.value) {
+ this.msgEl.innerHTML="New password is confirmed.";
+ this.msgEl.style.color="#008000";
+ return true;
+ }
+ else {
+ this.msgEl.innerHTML="Password don't match!";
+ this.msgEl.style.color="#800000";
+ return false;
+ }
+ }
+ },
+ move : function() {
+ this.textbox0.style.width = this.getTdEl().offsetWidth + "px";
+ this.textbox1.style.width = this.getTdEl().offsetWidth + "px";
+ widget.PasswordCellEditor.superclass.move.call(this);
+ },
+ resetForm : function() {
+ this.textbox0.value = lang.isValue(this.value) ? this.value.toString() : "";
+ this.textbox1.value = lang.isValue(this.value) ? this.value.toString() : "";
+ },
+ focus : function() {
+ this.textbox0.focus();
+ this.textbox0.select();
+ },
+ handleDisabledBtns : function() {
+ this.subscribe("blurEvent", function(v){
+ if (this.checkPasswords()) {
+ // Save on blur
+ this.save();
+ }
+ }, this, true);
+ },
+ getInputValue : function() {
+ if (this.checkPasswords()) return this.textbox0.value;
+ else return "";
+ }
+});
+
+// Copy static members to PasswordCellEditor class
+lang.augmentObject(widget.PasswordCellEditor, widget.BaseCellEditor);
+
+
+//cell formatter for password fields
+DataTableUtils={
+ PasswordFormatter:function(el,oRecord,oColumn,oData){
+ if (oData==null || oData=='') oData='xxxxxxxx';
+ {
+ el.innerHTML='';
+ var oStr = new String(oData);
+ for (var i=0; i") {
- var tagName = "/" + el.tagName;
- var ns;
- // remove content
- while ((ns = el.nextSibling) && ns.tagName != tagName) {
- ns.removeNode();
- }
- // remove the incorrect closing tag
- if (ns) {
- ns.removeNode();
- }
- }
- el.parentNode.replaceChild(newEl, el);
- return newEl;
- },
-
- /**
- * Public initializes a canvas element so that it can be used as canvas
- * element from now on. This is called automatically before the page is
- * loaded but if you are creating elements using createElement you need to
- * make sure this is called on the element.
- * @param {HTMLElement} el The canvas element to initialize.
- * @return {HTMLElement} the element that was created.
- */
- initElement: function (el) {
- el = this.fixElement_(el);
- el.getContext = function () {
- if (this.context_) {
- return this.context_;
- }
- return this.context_ = new CanvasRenderingContext2D_(this);
- };
-
- // do not use inline function because that will leak memory
- el.attachEvent('onpropertychange', onPropertyChange);
- el.attachEvent('onresize', onResize);
-
- var attrs = el.attributes;
- if (attrs.width && attrs.width.specified) {
- // TODO: use runtimeStyle and coordsize
- // el.getContext().setWidth_(attrs.width.nodeValue);
- el.style.width = attrs.width.nodeValue + "px";
- } else {
- el.width = el.clientWidth;
- }
- if (attrs.height && attrs.height.specified) {
- // TODO: use runtimeStyle and coordsize
- // el.getContext().setHeight_(attrs.height.nodeValue);
- el.style.height = attrs.height.nodeValue + "px";
- } else {
- el.height = el.clientHeight;
- }
- //el.getContext().setCoordsize_()
- return el;
- }
- };
-
- function onPropertyChange(e) {
- var el = e.srcElement;
-
- switch (e.propertyName) {
- case 'width':
- el.style.width = el.attributes.width.nodeValue + "px";
- el.getContext().clearRect();
- break;
- case 'height':
- el.style.height = el.attributes.height.nodeValue + "px";
- el.getContext().clearRect();
- break;
- }
- }
-
- function onResize(e) {
- var el = e.srcElement;
- if (el.firstChild) {
- el.firstChild.style.width = el.clientWidth + 'px';
- el.firstChild.style.height = el.clientHeight + 'px';
- }
- }
-
- G_vmlCanvasManager_.init();
-
- // precompute "00" to "FF"
- var dec2hex = [];
- for (var i = 0; i < 16; i++) {
- for (var j = 0; j < 16; j++) {
- dec2hex[i * 16 + j] = i.toString(16) + j.toString(16);
- }
- }
-
- function createMatrixIdentity() {
- return [
- [1, 0, 0],
- [0, 1, 0],
- [0, 0, 1]
- ];
- }
-
- function matrixMultiply(m1, m2) {
- var result = createMatrixIdentity();
-
- for (var x = 0; x < 3; x++) {
- for (var y = 0; y < 3; y++) {
- var sum = 0;
-
- for (var z = 0; z < 3; z++) {
- sum += m1[x][z] * m2[z][y];
- }
-
- result[x][y] = sum;
- }
- }
- return result;
- }
-
- function copyState(o1, o2) {
- o2.fillStyle = o1.fillStyle;
- o2.lineCap = o1.lineCap;
- o2.lineJoin = o1.lineJoin;
- o2.lineWidth = o1.lineWidth;
- o2.miterLimit = o1.miterLimit;
- o2.shadowBlur = o1.shadowBlur;
- o2.shadowColor = o1.shadowColor;
- o2.shadowOffsetX = o1.shadowOffsetX;
- o2.shadowOffsetY = o1.shadowOffsetY;
- o2.strokeStyle = o1.strokeStyle;
- o2.arcScaleX_ = o1.arcScaleX_;
- o2.arcScaleY_ = o1.arcScaleY_;
- }
-
- function processStyle(styleString) {
- var str, alpha = 1;
-
- styleString = String(styleString);
- if (styleString.substring(0, 3) == "rgb") {
- var start = styleString.indexOf("(", 3);
- var end = styleString.indexOf(")", start + 1);
- var guts = styleString.substring(start + 1, end).split(",");
-
- str = "#";
- for (var i = 0; i < 3; i++) {
- str += dec2hex[Number(guts[i])];
- }
-
- if ((guts.length == 4) && (styleString.substr(3, 1) == "a")) {
- alpha = guts[3];
- }
- } else {
- str = styleString;
- }
-
- return [str, alpha];
- }
-
- function processLineCap(lineCap) {
- switch (lineCap) {
- case "butt":
- return "flat";
- case "round":
- return "round";
- case "square":
- default:
- return "square";
- }
- }
-
- /**
- * This class implements CanvasRenderingContext2D interface as described by
- * the WHATWG.
- * @param {HTMLElement} surfaceElement The element that the 2D context should
- * be associated with
- */
- function CanvasRenderingContext2D_(surfaceElement) {
- this.m_ = createMatrixIdentity();
-
- this.mStack_ = [];
- this.aStack_ = [];
- this.currentPath_ = [];
-
- // Canvas context properties
- this.strokeStyle = "#000";
- this.fillStyle = "#000";
-
- this.lineWidth = 1;
- this.lineJoin = "miter";
- this.lineCap = "butt";
- this.miterLimit = Z * 1;
- this.globalAlpha = 1;
- this.canvas = surfaceElement;
-
- var el = surfaceElement.ownerDocument.createElement('div');
- el.style.width = surfaceElement.clientWidth + 'px';
- el.style.height = surfaceElement.clientHeight + 'px';
- el.style.overflow = 'hidden';
- el.style.position = 'absolute';
- surfaceElement.appendChild(el);
-
- this.element_ = el;
- this.arcScaleX_ = 1;
- this.arcScaleY_ = 1;
- };
-
- var contextPrototype = CanvasRenderingContext2D_.prototype;
- contextPrototype.clearRect = function() {
- this.element_.innerHTML = "";
- this.currentPath_ = [];
- };
-
- contextPrototype.beginPath = function() {
- // TODO: Branch current matrix so that save/restore has no effect
- // as per safari docs.
-
- this.currentPath_ = [];
- };
-
- contextPrototype.moveTo = function(aX, aY) {
- this.currentPath_.push({type: "moveTo", x: aX, y: aY});
- this.currentX_ = aX;
- this.currentY_ = aY;
- };
-
- contextPrototype.lineTo = function(aX, aY) {
- this.currentPath_.push({type: "lineTo", x: aX, y: aY});
- this.currentX_ = aX;
- this.currentY_ = aY;
- };
-
- contextPrototype.bezierCurveTo = function(aCP1x, aCP1y,
- aCP2x, aCP2y,
- aX, aY) {
- this.currentPath_.push({type: "bezierCurveTo",
- cp1x: aCP1x,
- cp1y: aCP1y,
- cp2x: aCP2x,
- cp2y: aCP2y,
- x: aX,
- y: aY});
- this.currentX_ = aX;
- this.currentY_ = aY;
- };
-
- contextPrototype.quadraticCurveTo = function(aCPx, aCPy, aX, aY) {
- // the following is lifted almost directly from
- // http://developer.mozilla.org/en/docs/Canvas_tutorial:Drawing_shapes
- var cp1x = this.currentX_ + 2.0 / 3.0 * (aCPx - this.currentX_);
- var cp1y = this.currentY_ + 2.0 / 3.0 * (aCPy - this.currentY_);
- var cp2x = cp1x + (aX - this.currentX_) / 3.0;
- var cp2y = cp1y + (aY - this.currentY_) / 3.0;
- this.bezierCurveTo(cp1x, cp1y, cp2x, cp2y, aX, aY);
- };
-
- contextPrototype.arc = function(aX, aY, aRadius,
- aStartAngle, aEndAngle, aClockwise) {
- aRadius *= Z;
- var arcType = aClockwise ? "at" : "wa";
-
- var xStart = aX + (mc(aStartAngle) * aRadius) - Z2;
- var yStart = aY + (ms(aStartAngle) * aRadius) - Z2;
-
- var xEnd = aX + (mc(aEndAngle) * aRadius) - Z2;
- var yEnd = aY + (ms(aEndAngle) * aRadius) - Z2;
-
- // IE won't render arches drawn counter clockwise if xStart == xEnd.
- if (xStart == xEnd && !aClockwise) {
- xStart += 0.125; // Offset xStart by 1/80 of a pixel. Use something
- // that can be represented in binary
- }
-
- this.currentPath_.push({type: arcType,
- x: aX,
- y: aY,
- radius: aRadius,
- xStart: xStart,
- yStart: yStart,
- xEnd: xEnd,
- yEnd: yEnd});
-
- };
-
- contextPrototype.rect = function(aX, aY, aWidth, aHeight) {
- this.moveTo(aX, aY);
- this.lineTo(aX + aWidth, aY);
- this.lineTo(aX + aWidth, aY + aHeight);
- this.lineTo(aX, aY + aHeight);
- this.closePath();
- };
-
- contextPrototype.strokeRect = function(aX, aY, aWidth, aHeight) {
- // Will destroy any existing path (same as FF behaviour)
- this.beginPath();
- this.moveTo(aX, aY);
- this.lineTo(aX + aWidth, aY);
- this.lineTo(aX + aWidth, aY + aHeight);
- this.lineTo(aX, aY + aHeight);
- this.closePath();
- this.stroke();
- };
-
- contextPrototype.fillRect = function(aX, aY, aWidth, aHeight) {
- // Will destroy any existing path (same as FF behaviour)
- this.beginPath();
- this.moveTo(aX, aY);
- this.lineTo(aX + aWidth, aY);
- this.lineTo(aX + aWidth, aY + aHeight);
- this.lineTo(aX, aY + aHeight);
- this.closePath();
- this.fill();
- };
-
- contextPrototype.createLinearGradient = function(aX0, aY0, aX1, aY1) {
- var gradient = new CanvasGradient_("gradient");
- return gradient;
- };
-
- contextPrototype.createRadialGradient = function(aX0, aY0,
- aR0, aX1,
- aY1, aR1) {
- var gradient = new CanvasGradient_("gradientradial");
- gradient.radius1_ = aR0;
- gradient.radius2_ = aR1;
- gradient.focus_.x = aX0;
- gradient.focus_.y = aY0;
- return gradient;
- };
-
- contextPrototype.drawImage = function (image, var_args) {
- var dx, dy, dw, dh, sx, sy, sw, sh;
-
- // to find the original width we overide the width and height
- var oldRuntimeWidth = image.runtimeStyle.width;
- var oldRuntimeHeight = image.runtimeStyle.height;
- image.runtimeStyle.width = 'auto';
- image.runtimeStyle.height = 'auto';
-
- // get the original size
- var w = image.width;
- var h = image.height;
-
- // and remove overides
- image.runtimeStyle.width = oldRuntimeWidth;
- image.runtimeStyle.height = oldRuntimeHeight;
-
- if (arguments.length == 3) {
- dx = arguments[1];
- dy = arguments[2];
- sx = sy = 0;
- sw = dw = w;
- sh = dh = h;
- } else if (arguments.length == 5) {
- dx = arguments[1];
- dy = arguments[2];
- dw = arguments[3];
- dh = arguments[4];
- sx = sy = 0;
- sw = w;
- sh = h;
- } else if (arguments.length == 9) {
- sx = arguments[1];
- sy = arguments[2];
- sw = arguments[3];
- sh = arguments[4];
- dx = arguments[5];
- dy = arguments[6];
- dw = arguments[7];
- dh = arguments[8];
- } else {
- throw "Invalid number of arguments";
- }
-
- var d = this.getCoords_(dx, dy);
-
- var w2 = sw / 2;
- var h2 = sh / 2;
-
- var vmlStr = [];
-
- var W = 10;
- var H = 10;
-
- // For some reason that I've now forgotten, using divs didn't work
- vmlStr.push(' ' ,
- '',
- '');
-
- this.element_.insertAdjacentHTML("BeforeEnd",
- vmlStr.join(""));
- };
-
- contextPrototype.stroke = function(aFill) {
- var lineStr = [];
- var lineOpen = false;
- var a = processStyle(aFill ? this.fillStyle : this.strokeStyle);
- var color = a[0];
- var opacity = a[1] * this.globalAlpha;
-
- var W = 10;
- var H = 10;
-
- lineStr.push(' max.x) {
- max.x = c.x;
- }
- if (min.y == null || c.y < min.y) {
- min.y = c.y;
- }
- if (max.y == null || c.y > max.y) {
- max.y = c.y;
- }
- }
- }
- lineStr.push(' ">');
-
- if (typeof this.fillStyle == "object") {
- var focus = {x: "50%", y: "50%"};
- var width = (max.x - min.x);
- var height = (max.y - min.y);
- var dimension = (width > height) ? width : height;
-
- focus.x = mr((this.fillStyle.focus_.x / width) * 100 + 50) + "%";
- focus.y = mr((this.fillStyle.focus_.y / height) * 100 + 50) + "%";
-
- var colors = [];
-
- // inside radius (%)
- if (this.fillStyle.type_ == "gradientradial") {
- var inside = (this.fillStyle.radius1_ / dimension * 100);
-
- // percentage that outside radius exceeds inside radius
- var expansion = (this.fillStyle.radius2_ / dimension * 100) - inside;
- } else {
- var inside = 0;
- var expansion = 100;
- }
-
- var insidecolor = {offset: null, color: null};
- var outsidecolor = {offset: null, color: null};
-
- // We need to sort 'colors' by percentage, from 0 > 100 otherwise ie
- // won't interpret it correctly
- this.fillStyle.colors_.sort(function (cs1, cs2) {
- return cs1.offset - cs2.offset;
- });
-
- for (var i = 0; i < this.fillStyle.colors_.length; i++) {
- var fs = this.fillStyle.colors_[i];
-
- colors.push( (fs.offset * expansion) + inside, "% ", fs.color, ",");
-
- if (fs.offset > insidecolor.offset || insidecolor.offset == null) {
- insidecolor.offset = fs.offset;
- insidecolor.color = fs.color;
- }
-
- if (fs.offset < outsidecolor.offset || outsidecolor.offset == null) {
- outsidecolor.offset = fs.offset;
- outsidecolor.color = fs.color;
- }
- }
- colors.pop();
-
- lineStr.push('');
- } else if (aFill) {
- lineStr.push('');
- } else {
- lineStr.push(
- ''
- );
- }
-
- lineStr.push("");
-
- this.element_.insertAdjacentHTML("beforeEnd", lineStr.join(""));
-
- this.currentPath_ = [];
- };
-
- contextPrototype.fill = function() {
- this.stroke(true);
- }
-
- contextPrototype.closePath = function() {
- this.currentPath_.push({type: "close"});
- };
-
- /**
- * @private
- */
- contextPrototype.getCoords_ = function(aX, aY) {
- return {
- x: Z * (aX * this.m_[0][0] + aY * this.m_[1][0] + this.m_[2][0]) - Z2,
- y: Z * (aX * this.m_[0][1] + aY * this.m_[1][1] + this.m_[2][1]) - Z2
- }
- };
-
- contextPrototype.save = function() {
- var o = {};
- copyState(this, o);
- this.aStack_.push(o);
- this.mStack_.push(this.m_);
- this.m_ = matrixMultiply(createMatrixIdentity(), this.m_);
- };
-
- contextPrototype.restore = function() {
- copyState(this.aStack_.pop(), this);
- this.m_ = this.mStack_.pop();
- };
-
- contextPrototype.translate = function(aX, aY) {
- var m1 = [
- [1, 0, 0],
- [0, 1, 0],
- [aX, aY, 1]
- ];
-
- this.m_ = matrixMultiply(m1, this.m_);
- };
-
- contextPrototype.rotate = function(aRot) {
- var c = mc(aRot);
- var s = ms(aRot);
-
- var m1 = [
- [c, s, 0],
- [-s, c, 0],
- [0, 0, 1]
- ];
-
- this.m_ = matrixMultiply(m1, this.m_);
- };
-
- contextPrototype.scale = function(aX, aY) {
- this.arcScaleX_ *= aX;
- this.arcScaleY_ *= aY;
- var m1 = [
- [aX, 0, 0],
- [0, aY, 0],
- [0, 0, 1]
- ];
-
- this.m_ = matrixMultiply(m1, this.m_);
- };
-
- /******** STUBS ********/
- contextPrototype.clip = function() {
- // TODO: Implement
- };
-
- contextPrototype.arcTo = function() {
- // TODO: Implement
- };
-
- contextPrototype.createPattern = function() {
- return new CanvasPattern_;
- };
-
- // Gradient / Pattern Stubs
- function CanvasGradient_(aType) {
- this.type_ = aType;
- this.radius1_ = 0;
- this.radius2_ = 0;
- this.colors_ = [];
- this.focus_ = {x: 0, y: 0};
- }
-
- CanvasGradient_.prototype.addColorStop = function(aOffset, aColor) {
- aColor = processStyle(aColor);
- this.colors_.push({offset: 1-aOffset, color: aColor});
- };
-
- function CanvasPattern_() {}
-
- // set up externs
- G_vmlCanvasManager = G_vmlCanvasManager_;
- CanvasRenderingContext2D = CanvasRenderingContext2D_;
- CanvasGradient = CanvasGradient_;
- CanvasPattern = CanvasPattern_;
-
-})();
-
-} // if
+// Copyright 2006 Google Inc.
+//
+// Licensed 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.
+
+
+// Known Issues:
+//
+// * Patterns are not implemented.
+// * Radial gradient are not implemented. The VML version of these look very
+// different from the canvas one.
+// * Clipping paths are not implemented.
+// * Coordsize. The width and height attribute have higher priority than the
+// width and height style values which isn't correct.
+// * Painting mode isn't implemented.
+// * Canvas width/height should is using content-box by default. IE in
+// Quirks mode will draw the canvas using border-box. Either change your
+// doctype to HTML5
+// (http://www.whatwg.org/specs/web-apps/current-work/#the-doctype)
+// or use Box Sizing Behavior from WebFX
+// (http://webfx.eae.net/dhtml/boxsizing/boxsizing.html)
+// * Optimize. There is always room for speed improvements.
+
+// only add this code if we do not already have a canvas implementation
+if (!window.CanvasRenderingContext2D) {
+
+(function () {
+
+ // alias some functions to make (compiled) code shorter
+ var m = Math;
+ var mr = m.round;
+ var ms = m.sin;
+ var mc = m.cos;
+
+ // this is used for sub pixel precision
+ var Z = 10;
+ var Z2 = Z / 2;
+
+ var G_vmlCanvasManager_ = {
+ init: function (opt_doc) {
+ var doc = opt_doc || document;
+ if (/MSIE/.test(navigator.userAgent) && !window.opera) {
+ var self = this;
+ doc.attachEvent("onreadystatechange", function () {
+ self.init_(doc);
+ });
+ }
+ },
+
+ init_: function (doc) {
+ if (doc.readyState == "complete") {
+ // create xmlns
+ if (!doc.namespaces["g_vml_"]) {
+ doc.namespaces.add("g_vml_", "urn:schemas-microsoft-com:vml");
+ }
+
+ // setup default css
+ var ss = doc.createStyleSheet();
+ ss.cssText = "canvas{display:inline-block;overflow:hidden;" +
+ // default size is 300x150 in Gecko and Opera
+ "text-align:left;width:300px;height:150px}" +
+ "g_vml_\\:*{behavior:url(#default#VML)}";
+
+ // find all canvas elements
+ var els = doc.getElementsByTagName("canvas");
+ for (var i = 0; i < els.length; i++) {
+ if (!els[i].getContext) {
+ this.initElement(els[i]);
+ }
+ }
+ }
+ },
+
+ fixElement_: function (el) {
+ // in IE before version 5.5 we would need to add HTML: to the tag name
+ // but we do not care about IE before version 6
+ var outerHTML = el.outerHTML;
+
+ var newEl = el.ownerDocument.createElement(outerHTML);
+ // if the tag is still open IE has created the children as siblings and
+ // it has also created a tag with the name "/FOO"
+ if (outerHTML.slice(-2) != "/>") {
+ var tagName = "/" + el.tagName;
+ var ns;
+ // remove content
+ while ((ns = el.nextSibling) && ns.tagName != tagName) {
+ ns.removeNode();
+ }
+ // remove the incorrect closing tag
+ if (ns) {
+ ns.removeNode();
+ }
+ }
+ el.parentNode.replaceChild(newEl, el);
+ return newEl;
+ },
+
+ /**
+ * Public initializes a canvas element so that it can be used as canvas
+ * element from now on. This is called automatically before the page is
+ * loaded but if you are creating elements using createElement you need to
+ * make sure this is called on the element.
+ * @param {HTMLElement} el The canvas element to initialize.
+ * @return {HTMLElement} the element that was created.
+ */
+ initElement: function (el) {
+ el = this.fixElement_(el);
+ el.getContext = function () {
+ if (this.context_) {
+ return this.context_;
+ }
+ return this.context_ = new CanvasRenderingContext2D_(this);
+ };
+
+ // do not use inline function because that will leak memory
+ el.attachEvent('onpropertychange', onPropertyChange);
+ el.attachEvent('onresize', onResize);
+
+ var attrs = el.attributes;
+ if (attrs.width && attrs.width.specified) {
+ // TODO: use runtimeStyle and coordsize
+ // el.getContext().setWidth_(attrs.width.nodeValue);
+ el.style.width = attrs.width.nodeValue + "px";
+ } else {
+ el.width = el.clientWidth;
+ }
+ if (attrs.height && attrs.height.specified) {
+ // TODO: use runtimeStyle and coordsize
+ // el.getContext().setHeight_(attrs.height.nodeValue);
+ el.style.height = attrs.height.nodeValue + "px";
+ } else {
+ el.height = el.clientHeight;
+ }
+ //el.getContext().setCoordsize_()
+ return el;
+ }
+ };
+
+ function onPropertyChange(e) {
+ var el = e.srcElement;
+
+ switch (e.propertyName) {
+ case 'width':
+ el.style.width = el.attributes.width.nodeValue + "px";
+ el.getContext().clearRect();
+ break;
+ case 'height':
+ el.style.height = el.attributes.height.nodeValue + "px";
+ el.getContext().clearRect();
+ break;
+ }
+ }
+
+ function onResize(e) {
+ var el = e.srcElement;
+ if (el.firstChild) {
+ el.firstChild.style.width = el.clientWidth + 'px';
+ el.firstChild.style.height = el.clientHeight + 'px';
+ }
+ }
+
+ G_vmlCanvasManager_.init();
+
+ // precompute "00" to "FF"
+ var dec2hex = [];
+ for (var i = 0; i < 16; i++) {
+ for (var j = 0; j < 16; j++) {
+ dec2hex[i * 16 + j] = i.toString(16) + j.toString(16);
+ }
+ }
+
+ function createMatrixIdentity() {
+ return [
+ [1, 0, 0],
+ [0, 1, 0],
+ [0, 0, 1]
+ ];
+ }
+
+ function matrixMultiply(m1, m2) {
+ var result = createMatrixIdentity();
+
+ for (var x = 0; x < 3; x++) {
+ for (var y = 0; y < 3; y++) {
+ var sum = 0;
+
+ for (var z = 0; z < 3; z++) {
+ sum += m1[x][z] * m2[z][y];
+ }
+
+ result[x][y] = sum;
+ }
+ }
+ return result;
+ }
+
+ function copyState(o1, o2) {
+ o2.fillStyle = o1.fillStyle;
+ o2.lineCap = o1.lineCap;
+ o2.lineJoin = o1.lineJoin;
+ o2.lineWidth = o1.lineWidth;
+ o2.miterLimit = o1.miterLimit;
+ o2.shadowBlur = o1.shadowBlur;
+ o2.shadowColor = o1.shadowColor;
+ o2.shadowOffsetX = o1.shadowOffsetX;
+ o2.shadowOffsetY = o1.shadowOffsetY;
+ o2.strokeStyle = o1.strokeStyle;
+ o2.arcScaleX_ = o1.arcScaleX_;
+ o2.arcScaleY_ = o1.arcScaleY_;
+ }
+
+ function processStyle(styleString) {
+ var str, alpha = 1;
+
+ styleString = String(styleString);
+ if (styleString.substring(0, 3) == "rgb") {
+ var start = styleString.indexOf("(", 3);
+ var end = styleString.indexOf(")", start + 1);
+ var guts = styleString.substring(start + 1, end).split(",");
+
+ str = "#";
+ for (var i = 0; i < 3; i++) {
+ str += dec2hex[Number(guts[i])];
+ }
+
+ if ((guts.length == 4) && (styleString.substr(3, 1) == "a")) {
+ alpha = guts[3];
+ }
+ } else {
+ str = styleString;
+ }
+
+ return [str, alpha];
+ }
+
+ function processLineCap(lineCap) {
+ switch (lineCap) {
+ case "butt":
+ return "flat";
+ case "round":
+ return "round";
+ case "square":
+ default:
+ return "square";
+ }
+ }
+
+ /**
+ * This class implements CanvasRenderingContext2D interface as described by
+ * the WHATWG.
+ * @param {HTMLElement} surfaceElement The element that the 2D context should
+ * be associated with
+ */
+ function CanvasRenderingContext2D_(surfaceElement) {
+ this.m_ = createMatrixIdentity();
+
+ this.mStack_ = [];
+ this.aStack_ = [];
+ this.currentPath_ = [];
+
+ // Canvas context properties
+ this.strokeStyle = "#000";
+ this.fillStyle = "#000";
+
+ this.lineWidth = 1;
+ this.lineJoin = "miter";
+ this.lineCap = "butt";
+ this.miterLimit = Z * 1;
+ this.globalAlpha = 1;
+ this.canvas = surfaceElement;
+
+ var el = surfaceElement.ownerDocument.createElement('div');
+ el.style.width = surfaceElement.clientWidth + 'px';
+ el.style.height = surfaceElement.clientHeight + 'px';
+ el.style.overflow = 'hidden';
+ el.style.position = 'absolute';
+ surfaceElement.appendChild(el);
+
+ this.element_ = el;
+ this.arcScaleX_ = 1;
+ this.arcScaleY_ = 1;
+ };
+
+ var contextPrototype = CanvasRenderingContext2D_.prototype;
+ contextPrototype.clearRect = function() {
+ this.element_.innerHTML = "";
+ this.currentPath_ = [];
+ };
+
+ contextPrototype.beginPath = function() {
+ // TODO: Branch current matrix so that save/restore has no effect
+ // as per safari docs.
+
+ this.currentPath_ = [];
+ };
+
+ contextPrototype.moveTo = function(aX, aY) {
+ this.currentPath_.push({type: "moveTo", x: aX, y: aY});
+ this.currentX_ = aX;
+ this.currentY_ = aY;
+ };
+
+ contextPrototype.lineTo = function(aX, aY) {
+ this.currentPath_.push({type: "lineTo", x: aX, y: aY});
+ this.currentX_ = aX;
+ this.currentY_ = aY;
+ };
+
+ contextPrototype.bezierCurveTo = function(aCP1x, aCP1y,
+ aCP2x, aCP2y,
+ aX, aY) {
+ this.currentPath_.push({type: "bezierCurveTo",
+ cp1x: aCP1x,
+ cp1y: aCP1y,
+ cp2x: aCP2x,
+ cp2y: aCP2y,
+ x: aX,
+ y: aY});
+ this.currentX_ = aX;
+ this.currentY_ = aY;
+ };
+
+ contextPrototype.quadraticCurveTo = function(aCPx, aCPy, aX, aY) {
+ // the following is lifted almost directly from
+ // http://developer.mozilla.org/en/docs/Canvas_tutorial:Drawing_shapes
+ var cp1x = this.currentX_ + 2.0 / 3.0 * (aCPx - this.currentX_);
+ var cp1y = this.currentY_ + 2.0 / 3.0 * (aCPy - this.currentY_);
+ var cp2x = cp1x + (aX - this.currentX_) / 3.0;
+ var cp2y = cp1y + (aY - this.currentY_) / 3.0;
+ this.bezierCurveTo(cp1x, cp1y, cp2x, cp2y, aX, aY);
+ };
+
+ contextPrototype.arc = function(aX, aY, aRadius,
+ aStartAngle, aEndAngle, aClockwise) {
+ aRadius *= Z;
+ var arcType = aClockwise ? "at" : "wa";
+
+ var xStart = aX + (mc(aStartAngle) * aRadius) - Z2;
+ var yStart = aY + (ms(aStartAngle) * aRadius) - Z2;
+
+ var xEnd = aX + (mc(aEndAngle) * aRadius) - Z2;
+ var yEnd = aY + (ms(aEndAngle) * aRadius) - Z2;
+
+ // IE won't render arches drawn counter clockwise if xStart == xEnd.
+ if (xStart == xEnd && !aClockwise) {
+ xStart += 0.125; // Offset xStart by 1/80 of a pixel. Use something
+ // that can be represented in binary
+ }
+
+ this.currentPath_.push({type: arcType,
+ x: aX,
+ y: aY,
+ radius: aRadius,
+ xStart: xStart,
+ yStart: yStart,
+ xEnd: xEnd,
+ yEnd: yEnd});
+
+ };
+
+ contextPrototype.rect = function(aX, aY, aWidth, aHeight) {
+ this.moveTo(aX, aY);
+ this.lineTo(aX + aWidth, aY);
+ this.lineTo(aX + aWidth, aY + aHeight);
+ this.lineTo(aX, aY + aHeight);
+ this.closePath();
+ };
+
+ contextPrototype.strokeRect = function(aX, aY, aWidth, aHeight) {
+ // Will destroy any existing path (same as FF behaviour)
+ this.beginPath();
+ this.moveTo(aX, aY);
+ this.lineTo(aX + aWidth, aY);
+ this.lineTo(aX + aWidth, aY + aHeight);
+ this.lineTo(aX, aY + aHeight);
+ this.closePath();
+ this.stroke();
+ };
+
+ contextPrototype.fillRect = function(aX, aY, aWidth, aHeight) {
+ // Will destroy any existing path (same as FF behaviour)
+ this.beginPath();
+ this.moveTo(aX, aY);
+ this.lineTo(aX + aWidth, aY);
+ this.lineTo(aX + aWidth, aY + aHeight);
+ this.lineTo(aX, aY + aHeight);
+ this.closePath();
+ this.fill();
+ };
+
+ contextPrototype.createLinearGradient = function(aX0, aY0, aX1, aY1) {
+ var gradient = new CanvasGradient_("gradient");
+ return gradient;
+ };
+
+ contextPrototype.createRadialGradient = function(aX0, aY0,
+ aR0, aX1,
+ aY1, aR1) {
+ var gradient = new CanvasGradient_("gradientradial");
+ gradient.radius1_ = aR0;
+ gradient.radius2_ = aR1;
+ gradient.focus_.x = aX0;
+ gradient.focus_.y = aY0;
+ return gradient;
+ };
+
+ contextPrototype.drawImage = function (image, var_args) {
+ var dx, dy, dw, dh, sx, sy, sw, sh;
+
+ // to find the original width we overide the width and height
+ var oldRuntimeWidth = image.runtimeStyle.width;
+ var oldRuntimeHeight = image.runtimeStyle.height;
+ image.runtimeStyle.width = 'auto';
+ image.runtimeStyle.height = 'auto';
+
+ // get the original size
+ var w = image.width;
+ var h = image.height;
+
+ // and remove overides
+ image.runtimeStyle.width = oldRuntimeWidth;
+ image.runtimeStyle.height = oldRuntimeHeight;
+
+ if (arguments.length == 3) {
+ dx = arguments[1];
+ dy = arguments[2];
+ sx = sy = 0;
+ sw = dw = w;
+ sh = dh = h;
+ } else if (arguments.length == 5) {
+ dx = arguments[1];
+ dy = arguments[2];
+ dw = arguments[3];
+ dh = arguments[4];
+ sx = sy = 0;
+ sw = w;
+ sh = h;
+ } else if (arguments.length == 9) {
+ sx = arguments[1];
+ sy = arguments[2];
+ sw = arguments[3];
+ sh = arguments[4];
+ dx = arguments[5];
+ dy = arguments[6];
+ dw = arguments[7];
+ dh = arguments[8];
+ } else {
+ throw "Invalid number of arguments";
+ }
+
+ var d = this.getCoords_(dx, dy);
+
+ var w2 = sw / 2;
+ var h2 = sh / 2;
+
+ var vmlStr = [];
+
+ var W = 10;
+ var H = 10;
+
+ // For some reason that I've now forgotten, using divs didn't work
+ vmlStr.push(' ' ,
+ '',
+ '');
+
+ this.element_.insertAdjacentHTML("BeforeEnd",
+ vmlStr.join(""));
+ };
+
+ contextPrototype.stroke = function(aFill) {
+ var lineStr = [];
+ var lineOpen = false;
+ var a = processStyle(aFill ? this.fillStyle : this.strokeStyle);
+ var color = a[0];
+ var opacity = a[1] * this.globalAlpha;
+
+ var W = 10;
+ var H = 10;
+
+ lineStr.push(' max.x) {
+ max.x = c.x;
+ }
+ if (min.y == null || c.y < min.y) {
+ min.y = c.y;
+ }
+ if (max.y == null || c.y > max.y) {
+ max.y = c.y;
+ }
+ }
+ }
+ lineStr.push(' ">');
+
+ if (typeof this.fillStyle == "object") {
+ var focus = {x: "50%", y: "50%"};
+ var width = (max.x - min.x);
+ var height = (max.y - min.y);
+ var dimension = (width > height) ? width : height;
+
+ focus.x = mr((this.fillStyle.focus_.x / width) * 100 + 50) + "%";
+ focus.y = mr((this.fillStyle.focus_.y / height) * 100 + 50) + "%";
+
+ var colors = [];
+
+ // inside radius (%)
+ if (this.fillStyle.type_ == "gradientradial") {
+ var inside = (this.fillStyle.radius1_ / dimension * 100);
+
+ // percentage that outside radius exceeds inside radius
+ var expansion = (this.fillStyle.radius2_ / dimension * 100) - inside;
+ } else {
+ var inside = 0;
+ var expansion = 100;
+ }
+
+ var insidecolor = {offset: null, color: null};
+ var outsidecolor = {offset: null, color: null};
+
+ // We need to sort 'colors' by percentage, from 0 > 100 otherwise ie
+ // won't interpret it correctly
+ this.fillStyle.colors_.sort(function (cs1, cs2) {
+ return cs1.offset - cs2.offset;
+ });
+
+ for (var i = 0; i < this.fillStyle.colors_.length; i++) {
+ var fs = this.fillStyle.colors_[i];
+
+ colors.push( (fs.offset * expansion) + inside, "% ", fs.color, ",");
+
+ if (fs.offset > insidecolor.offset || insidecolor.offset == null) {
+ insidecolor.offset = fs.offset;
+ insidecolor.color = fs.color;
+ }
+
+ if (fs.offset < outsidecolor.offset || outsidecolor.offset == null) {
+ outsidecolor.offset = fs.offset;
+ outsidecolor.color = fs.color;
+ }
+ }
+ colors.pop();
+
+ lineStr.push('');
+ } else if (aFill) {
+ lineStr.push('');
+ } else {
+ lineStr.push(
+ ''
+ );
+ }
+
+ lineStr.push("");
+
+ this.element_.insertAdjacentHTML("beforeEnd", lineStr.join(""));
+
+ this.currentPath_ = [];
+ };
+
+ contextPrototype.fill = function() {
+ this.stroke(true);
+ }
+
+ contextPrototype.closePath = function() {
+ this.currentPath_.push({type: "close"});
+ };
+
+ /**
+ * @private
+ */
+ contextPrototype.getCoords_ = function(aX, aY) {
+ return {
+ x: Z * (aX * this.m_[0][0] + aY * this.m_[1][0] + this.m_[2][0]) - Z2,
+ y: Z * (aX * this.m_[0][1] + aY * this.m_[1][1] + this.m_[2][1]) - Z2
+ }
+ };
+
+ contextPrototype.save = function() {
+ var o = {};
+ copyState(this, o);
+ this.aStack_.push(o);
+ this.mStack_.push(this.m_);
+ this.m_ = matrixMultiply(createMatrixIdentity(), this.m_);
+ };
+
+ contextPrototype.restore = function() {
+ copyState(this.aStack_.pop(), this);
+ this.m_ = this.mStack_.pop();
+ };
+
+ contextPrototype.translate = function(aX, aY) {
+ var m1 = [
+ [1, 0, 0],
+ [0, 1, 0],
+ [aX, aY, 1]
+ ];
+
+ this.m_ = matrixMultiply(m1, this.m_);
+ };
+
+ contextPrototype.rotate = function(aRot) {
+ var c = mc(aRot);
+ var s = ms(aRot);
+
+ var m1 = [
+ [c, s, 0],
+ [-s, c, 0],
+ [0, 0, 1]
+ ];
+
+ this.m_ = matrixMultiply(m1, this.m_);
+ };
+
+ contextPrototype.scale = function(aX, aY) {
+ this.arcScaleX_ *= aX;
+ this.arcScaleY_ *= aY;
+ var m1 = [
+ [aX, 0, 0],
+ [0, aY, 0],
+ [0, 0, 1]
+ ];
+
+ this.m_ = matrixMultiply(m1, this.m_);
+ };
+
+ /******** STUBS ********/
+ contextPrototype.clip = function() {
+ // TODO: Implement
+ };
+
+ contextPrototype.arcTo = function() {
+ // TODO: Implement
+ };
+
+ contextPrototype.createPattern = function() {
+ return new CanvasPattern_;
+ };
+
+ // Gradient / Pattern Stubs
+ function CanvasGradient_(aType) {
+ this.type_ = aType;
+ this.radius1_ = 0;
+ this.radius2_ = 0;
+ this.colors_ = [];
+ this.focus_ = {x: 0, y: 0};
+ }
+
+ CanvasGradient_.prototype.addColorStop = function(aOffset, aColor) {
+ aColor = processStyle(aColor);
+ this.colors_.push({offset: 1-aOffset, color: aColor});
+ };
+
+ function CanvasPattern_() {}
+
+ // set up externs
+ G_vmlCanvasManager = G_vmlCanvasManager_;
+ CanvasRenderingContext2D = CanvasRenderingContext2D_;
+ CanvasGradient = CanvasGradient_;
+ CanvasPattern = CanvasPattern_;
+
+})();
+
+} // if
diff --git a/js-ext/firebug-License.txt b/js-ext/firebug-License.txt
index 13679b3b..06f96514 100755
--- a/js-ext/firebug-License.txt
+++ b/js-ext/firebug-License.txt
@@ -1,469 +1,469 @@
- MOZILLA PUBLIC LICENSE
- Version 1.1
-
- ---------------
-
-1. Definitions.
-
- 1.0.1. "Commercial Use" means distribution or otherwise making the
- Covered Code available to a third party.
-
- 1.1. "Contributor" means each entity that creates or contributes to
- the creation of Modifications.
-
- 1.2. "Contributor Version" means the combination of the Original
- Code, prior Modifications used by a Contributor, and the Modifications
- made by that particular Contributor.
-
- 1.3. "Covered Code" means the Original Code or Modifications or the
- combination of the Original Code and Modifications, in each case
- including portions thereof.
-
- 1.4. "Electronic Distribution Mechanism" means a mechanism generally
- accepted in the software development community for the electronic
- transfer of data.
-
- 1.5. "Executable" means Covered Code in any form other than Source
- Code.
-
- 1.6. "Initial Developer" means the individual or entity identified
- as the Initial Developer in the Source Code notice required by Exhibit
- A.
-
- 1.7. "Larger Work" means a work which combines Covered Code or
- portions thereof with code not governed by the terms of this License.
-
- 1.8. "License" means this document.
-
- 1.8.1. "Licensable" means having the right to grant, to the maximum
- extent possible, whether at the time of the initial grant or
- subsequently acquired, any and all of the rights conveyed herein.
-
- 1.9. "Modifications" means any addition to or deletion from the
- substance or structure of either the Original Code or any previous
- Modifications. When Covered Code is released as a series of files, a
- Modification is:
- A. Any addition to or deletion from the contents of a file
- containing Original Code or previous Modifications.
-
- B. Any new file that contains any part of the Original Code or
- previous Modifications.
-
- 1.10. "Original Code" means Source Code of computer software code
- which is described in the Source Code notice required by Exhibit A as
- Original Code, and which, at the time of its release under this
- License is not already Covered Code governed by this License.
-
- 1.10.1. "Patent Claims" means any patent claim(s), now owned or
- hereafter acquired, including without limitation, method, process,
- and apparatus claims, in any patent Licensable by grantor.
-
- 1.11. "Source Code" means the preferred form of the Covered Code for
- making modifications to it, including all modules it contains, plus
- any associated interface definition files, scripts used to control
- compilation and installation of an Executable, or source code
- differential comparisons against either the Original Code or another
- well known, available Covered Code of the Contributor's choice. The
- Source Code can be in a compressed or archival form, provided the
- appropriate decompression or de-archiving software is widely available
- for no charge.
-
- 1.12. "You" (or "Your") means an individual or a legal entity
- exercising rights under, and complying with all of the terms of, this
- License or a future version of this License issued under Section 6.1.
- For legal entities, "You" includes any entity which controls, is
- controlled by, or is under common control with You. For purposes of
- this definition, "control" means (a) the power, direct or indirect,
- to cause the direction or management of such entity, whether by
- contract or otherwise, or (b) ownership of more than fifty percent
- (50%) of the outstanding shares or beneficial ownership of such
- entity.
-
-2. Source Code License.
-
- 2.1. The Initial Developer Grant.
- The Initial Developer hereby grants You a world-wide, royalty-free,
- non-exclusive license, subject to third party intellectual property
- claims:
- (a) under intellectual property rights (other than patent or
- trademark) Licensable by Initial Developer to use, reproduce,
- modify, display, perform, sublicense and distribute the Original
- Code (or portions thereof) with or without Modifications, and/or
- as part of a Larger Work; and
-
- (b) under Patents Claims infringed by the making, using or
- selling of Original Code, to make, have made, use, practice,
- sell, and offer for sale, and/or otherwise dispose of the
- Original Code (or portions thereof).
-
- (c) the licenses granted in this Section 2.1(a) and (b) are
- effective on the date Initial Developer first distributes
- Original Code under the terms of this License.
-
- (d) Notwithstanding Section 2.1(b) above, no patent license is
- granted: 1) for code that You delete from the Original Code; 2)
- separate from the Original Code; or 3) for infringements caused
- by: i) the modification of the Original Code or ii) the
- combination of the Original Code with other software or devices.
-
- 2.2. Contributor Grant.
- Subject to third party intellectual property claims, each Contributor
- hereby grants You a world-wide, royalty-free, non-exclusive license
-
- (a) under intellectual property rights (other than patent or
- trademark) Licensable by Contributor, to use, reproduce, modify,
- display, perform, sublicense and distribute the Modifications
- created by such Contributor (or portions thereof) either on an
- unmodified basis, with other Modifications, as Covered Code
- and/or as part of a Larger Work; and
-
- (b) under Patent Claims infringed by the making, using, or
- selling of Modifications made by that Contributor either alone
- and/or in combination with its Contributor Version (or portions
- of such combination), to make, use, sell, offer for sale, have
- made, and/or otherwise dispose of: 1) Modifications made by that
- Contributor (or portions thereof); and 2) the combination of
- Modifications made by that Contributor with its Contributor
- Version (or portions of such combination).
-
- (c) the licenses granted in Sections 2.2(a) and 2.2(b) are
- effective on the date Contributor first makes Commercial Use of
- the Covered Code.
-
- (d) Notwithstanding Section 2.2(b) above, no patent license is
- granted: 1) for any code that Contributor has deleted from the
- Contributor Version; 2) separate from the Contributor Version;
- 3) for infringements caused by: i) third party modifications of
- Contributor Version or ii) the combination of Modifications made
- by that Contributor with other software (except as part of the
- Contributor Version) or other devices; or 4) under Patent Claims
- infringed by Covered Code in the absence of Modifications made by
- that Contributor.
-
-3. Distribution Obligations.
-
- 3.1. Application of License.
- The Modifications which You create or to which You contribute are
- governed by the terms of this License, including without limitation
- Section 2.2. The Source Code version of Covered Code may be
- distributed only under the terms of this License or a future version
- of this License released under Section 6.1, and You must include a
- copy of this License with every copy of the Source Code You
- distribute. You may not offer or impose any terms on any Source Code
- version that alters or restricts the applicable version of this
- License or the recipients' rights hereunder. However, You may include
- an additional document offering the additional rights described in
- Section 3.5.
-
- 3.2. Availability of Source Code.
- Any Modification which You create or to which You contribute must be
- made available in Source Code form under the terms of this License
- either on the same media as an Executable version or via an accepted
- Electronic Distribution Mechanism to anyone to whom you made an
- Executable version available; and if made available via Electronic
- Distribution Mechanism, must remain available for at least twelve (12)
- months after the date it initially became available, or at least six
- (6) months after a subsequent version of that particular Modification
- has been made available to such recipients. You are responsible for
- ensuring that the Source Code version remains available even if the
- Electronic Distribution Mechanism is maintained by a third party.
-
- 3.3. Description of Modifications.
- You must cause all Covered Code to which You contribute to contain a
- file documenting the changes You made to create that Covered Code and
- the date of any change. You must include a prominent statement that
- the Modification is derived, directly or indirectly, from Original
- Code provided by the Initial Developer and including the name of the
- Initial Developer in (a) the Source Code, and (b) in any notice in an
- Executable version or related documentation in which You describe the
- origin or ownership of the Covered Code.
-
- 3.4. Intellectual Property Matters
- (a) Third Party Claims.
- If Contributor has knowledge that a license under a third party's
- intellectual property rights is required to exercise the rights
- granted by such Contributor under Sections 2.1 or 2.2,
- Contributor must include a text file with the Source Code
- distribution titled "LEGAL" which describes the claim and the
- party making the claim in sufficient detail that a recipient will
- know whom to contact. If Contributor obtains such knowledge after
- the Modification is made available as described in Section 3.2,
- Contributor shall promptly modify the LEGAL file in all copies
- Contributor makes available thereafter and shall take other steps
- (such as notifying appropriate mailing lists or newsgroups)
- reasonably calculated to inform those who received the Covered
- Code that new knowledge has been obtained.
-
- (b) Contributor APIs.
- If Contributor's Modifications include an application programming
- interface and Contributor has knowledge of patent licenses which
- are reasonably necessary to implement that API, Contributor must
- also include this information in the LEGAL file.
-
- (c) Representations.
- Contributor represents that, except as disclosed pursuant to
- Section 3.4(a) above, Contributor believes that Contributor's
- Modifications are Contributor's original creation(s) and/or
- Contributor has sufficient rights to grant the rights conveyed by
- this License.
-
- 3.5. Required Notices.
- You must duplicate the notice in Exhibit A in each file of the Source
- Code. If it is not possible to put such notice in a particular Source
- Code file due to its structure, then You must include such notice in a
- location (such as a relevant directory) where a user would be likely
- to look for such a notice. If You created one or more Modification(s)
- You may add your name as a Contributor to the notice described in
- Exhibit A. You must also duplicate this License in any documentation
- for the Source Code where You describe recipients' rights or ownership
- rights relating to Covered Code. You may choose to offer, and to
- charge a fee for, warranty, support, indemnity or liability
- obligations to one or more recipients of Covered Code. However, You
- may do so only on Your own behalf, and not on behalf of the Initial
- Developer or any Contributor. You must make it absolutely clear than
- any such warranty, support, indemnity or liability obligation is
- offered by You alone, and You hereby agree to indemnify the Initial
- Developer and every Contributor for any liability incurred by the
- Initial Developer or such Contributor as a result of warranty,
- support, indemnity or liability terms You offer.
-
- 3.6. Distribution of Executable Versions.
- You may distribute Covered Code in Executable form only if the
- requirements of Section 3.1-3.5 have been met for that Covered Code,
- and if You include a notice stating that the Source Code version of
- the Covered Code is available under the terms of this License,
- including a description of how and where You have fulfilled the
- obligations of Section 3.2. The notice must be conspicuously included
- in any notice in an Executable version, related documentation or
- collateral in which You describe recipients' rights relating to the
- Covered Code. You may distribute the Executable version of Covered
- Code or ownership rights under a license of Your choice, which may
- contain terms different from this License, provided that You are in
- compliance with the terms of this License and that the license for the
- Executable version does not attempt to limit or alter the recipient's
- rights in the Source Code version from the rights set forth in this
- License. If You distribute the Executable version under a different
- license You must make it absolutely clear that any terms which differ
- from this License are offered by You alone, not by the Initial
- Developer or any Contributor. You hereby agree to indemnify the
- Initial Developer and every Contributor for any liability incurred by
- the Initial Developer or such Contributor as a result of any such
- terms You offer.
-
- 3.7. Larger Works.
- You may create a Larger Work by combining Covered Code with other code
- not governed by the terms of this License and distribute the Larger
- Work as a single product. In such a case, You must make sure the
- requirements of this License are fulfilled for the Covered Code.
-
-4. Inability to Comply Due to Statute or Regulation.
-
- If it is impossible for You to comply with any of the terms of this
- License with respect to some or all of the Covered Code due to
- statute, judicial order, or regulation then You must: (a) comply with
- the terms of this License to the maximum extent possible; and (b)
- describe the limitations and the code they affect. Such description
- must be included in the LEGAL file described in Section 3.4 and must
- be included with all distributions of the Source Code. Except to the
- extent prohibited by statute or regulation, such description must be
- sufficiently detailed for a recipient of ordinary skill to be able to
- understand it.
-
-5. Application of this License.
-
- This License applies to code to which the Initial Developer has
- attached the notice in Exhibit A and to related Covered Code.
-
-6. Versions of the License.
-
- 6.1. New Versions.
- Netscape Communications Corporation ("Netscape") may publish revised
- and/or new versions of the License from time to time. Each version
- will be given a distinguishing version number.
-
- 6.2. Effect of New Versions.
- Once Covered Code has been published under a particular version of the
- License, You may always continue to use it under the terms of that
- version. You may also choose to use such Covered Code under the terms
- of any subsequent version of the License published by Netscape. No one
- other than Netscape has the right to modify the terms applicable to
- Covered Code created under this License.
-
- 6.3. Derivative Works.
- If You create or use a modified version of this License (which you may
- only do in order to apply it to code which is not already Covered Code
- governed by this License), You must (a) rename Your license so that
- the phrases "Mozilla", "MOZILLAPL", "MOZPL", "Netscape",
- "MPL", "NPL" or any confusingly similar phrase do not appear in your
- license (except to note that your license differs from this License)
- and (b) otherwise make it clear that Your version of the license
- contains terms which differ from the Mozilla Public License and
- Netscape Public License. (Filling in the name of the Initial
- Developer, Original Code or Contributor in the notice described in
- Exhibit A shall not of themselves be deemed to be modifications of
- this License.)
-
-7. DISCLAIMER OF WARRANTY.
-
- COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
- WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF
- DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING.
- THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE
- IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT,
- YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE
- COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER
- OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF
- ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
-
-8. TERMINATION.
-
- 8.1. This License and the rights granted hereunder will terminate
- automatically if You fail to comply with terms herein and fail to cure
- such breach within 30 days of becoming aware of the breach. All
- sublicenses to the Covered Code which are properly granted shall
- survive any termination of this License. Provisions which, by their
- nature, must remain in effect beyond the termination of this License
- shall survive.
-
- 8.2. If You initiate litigation by asserting a patent infringement
- claim (excluding declatory judgment actions) against Initial Developer
- or a Contributor (the Initial Developer or Contributor against whom
- You file such action is referred to as "Participant") alleging that:
-
- (a) such Participant's Contributor Version directly or indirectly
- infringes any patent, then any and all rights granted by such
- Participant to You under Sections 2.1 and/or 2.2 of this License
- shall, upon 60 days notice from Participant terminate prospectively,
- unless if within 60 days after receipt of notice You either: (i)
- agree in writing to pay Participant a mutually agreeable reasonable
- royalty for Your past and future use of Modifications made by such
- Participant, or (ii) withdraw Your litigation claim with respect to
- the Contributor Version against such Participant. If within 60 days
- of notice, a reasonable royalty and payment arrangement are not
- mutually agreed upon in writing by the parties or the litigation claim
- is not withdrawn, the rights granted by Participant to You under
- Sections 2.1 and/or 2.2 automatically terminate at the expiration of
- the 60 day notice period specified above.
-
- (b) any software, hardware, or device, other than such Participant's
- Contributor Version, directly or indirectly infringes any patent, then
- any rights granted to You by such Participant under Sections 2.1(b)
- and 2.2(b) are revoked effective as of the date You first made, used,
- sold, distributed, or had made, Modifications made by that
- Participant.
-
- 8.3. If You assert a patent infringement claim against Participant
- alleging that such Participant's Contributor Version directly or
- indirectly infringes any patent where such claim is resolved (such as
- by license or settlement) prior to the initiation of patent
- infringement litigation, then the reasonable value of the licenses
- granted by such Participant under Sections 2.1 or 2.2 shall be taken
- into account in determining the amount or value of any payment or
- license.
-
- 8.4. In the event of termination under Sections 8.1 or 8.2 above,
- all end user license agreements (excluding distributors and resellers)
- which have been validly granted by You or any distributor hereunder
- prior to termination shall survive termination.
-
-9. LIMITATION OF LIABILITY.
-
- UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT
- (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL
- DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE,
- OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR
- ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY
- CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL,
- WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER
- COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN
- INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF
- LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY
- RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW
- PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE
- EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO
- THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
-
-10. U.S. GOVERNMENT END USERS.
-
- The Covered Code is a "commercial item," as that term is defined in
- 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer
- software" and "commercial computer software documentation," as such
- terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48
- C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995),
- all U.S. Government End Users acquire Covered Code with only those
- rights set forth herein.
-
-11. MISCELLANEOUS.
-
- This License represents the complete agreement concerning subject
- matter hereof. If any provision of this License is held to be
- unenforceable, such provision shall be reformed only to the extent
- necessary to make it enforceable. This License shall be governed by
- California law provisions (except to the extent applicable law, if
- any, provides otherwise), excluding its conflict-of-law provisions.
- With respect to disputes in which at least one party is a citizen of,
- or an entity chartered or registered to do business in the United
- States of America, any litigation relating to this License shall be
- subject to the jurisdiction of the Federal Courts of the Northern
- District of California, with venue lying in Santa Clara County,
- California, with the losing party responsible for costs, including
- without limitation, court costs and reasonable attorneys' fees and
- expenses. The application of the United Nations Convention on
- Contracts for the International Sale of Goods is expressly excluded.
- Any law or regulation which provides that the language of a contract
- shall be construed against the drafter shall not apply to this
- License.
-
-12. RESPONSIBILITY FOR CLAIMS.
-
- As between Initial Developer and the Contributors, each party is
- responsible for claims and damages arising, directly or indirectly,
- out of its utilization of rights under this License and You agree to
- work with Initial Developer and Contributors to distribute such
- responsibility on an equitable basis. Nothing herein is intended or
- shall be deemed to constitute any admission of liability.
-
-13. MULTIPLE-LICENSED CODE.
-
- Initial Developer may designate portions of the Covered Code as
- "Multiple-Licensed". "Multiple-Licensed" means that the Initial
- Developer permits you to utilize portions of the Covered Code under
- Your choice of the NPL or the alternative licenses, if any, specified
- by the Initial Developer in the file described in Exhibit A.
-
-EXHIBIT A -Mozilla Public License.
-
- ``The contents of this file are subject to the Mozilla Public License
- Version 1.1 (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.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS IS"
- basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
- License for the specific language governing rights and limitations
- under the License.
-
- The Original Code is ______________________________________.
-
- The Initial Developer of the Original Code is ________________________.
- Portions created by ______________________ are Copyright (C) ______
- _______________________. All Rights Reserved.
-
- Contributor(s): ______________________________________.
-
- Alternatively, the contents of this file may be used under the terms
- of the _____ license (the "[___] License"), in which case the
- provisions of [______] License are applicable instead of those
- above. If you wish to allow use of your version of this file only
- under the terms of the [____] License and not to allow others to use
- your version of this file under the MPL, indicate your decision by
- deleting the provisions above and replace them with the notice and
- other provisions required by the [___] License. If you do not delete
- the provisions above, a recipient may use your version of this file
- under either the MPL or the [___] License."
-
- [NOTE: The text of this Exhibit A may differ slightly from the text of
- the notices in the Source Code files of the Original Code. You should
- use the text of this Exhibit A rather than the text found in the
- Original Code Source Code for Your Modifications.]
+ MOZILLA PUBLIC LICENSE
+ Version 1.1
+
+ ---------------
+
+1. Definitions.
+
+ 1.0.1. "Commercial Use" means distribution or otherwise making the
+ Covered Code available to a third party.
+
+ 1.1. "Contributor" means each entity that creates or contributes to
+ the creation of Modifications.
+
+ 1.2. "Contributor Version" means the combination of the Original
+ Code, prior Modifications used by a Contributor, and the Modifications
+ made by that particular Contributor.
+
+ 1.3. "Covered Code" means the Original Code or Modifications or the
+ combination of the Original Code and Modifications, in each case
+ including portions thereof.
+
+ 1.4. "Electronic Distribution Mechanism" means a mechanism generally
+ accepted in the software development community for the electronic
+ transfer of data.
+
+ 1.5. "Executable" means Covered Code in any form other than Source
+ Code.
+
+ 1.6. "Initial Developer" means the individual or entity identified
+ as the Initial Developer in the Source Code notice required by Exhibit
+ A.
+
+ 1.7. "Larger Work" means a work which combines Covered Code or
+ portions thereof with code not governed by the terms of this License.
+
+ 1.8. "License" means this document.
+
+ 1.8.1. "Licensable" means having the right to grant, to the maximum
+ extent possible, whether at the time of the initial grant or
+ subsequently acquired, any and all of the rights conveyed herein.
+
+ 1.9. "Modifications" means any addition to or deletion from the
+ substance or structure of either the Original Code or any previous
+ Modifications. When Covered Code is released as a series of files, a
+ Modification is:
+ A. Any addition to or deletion from the contents of a file
+ containing Original Code or previous Modifications.
+
+ B. Any new file that contains any part of the Original Code or
+ previous Modifications.
+
+ 1.10. "Original Code" means Source Code of computer software code
+ which is described in the Source Code notice required by Exhibit A as
+ Original Code, and which, at the time of its release under this
+ License is not already Covered Code governed by this License.
+
+ 1.10.1. "Patent Claims" means any patent claim(s), now owned or
+ hereafter acquired, including without limitation, method, process,
+ and apparatus claims, in any patent Licensable by grantor.
+
+ 1.11. "Source Code" means the preferred form of the Covered Code for
+ making modifications to it, including all modules it contains, plus
+ any associated interface definition files, scripts used to control
+ compilation and installation of an Executable, or source code
+ differential comparisons against either the Original Code or another
+ well known, available Covered Code of the Contributor's choice. The
+ Source Code can be in a compressed or archival form, provided the
+ appropriate decompression or de-archiving software is widely available
+ for no charge.
+
+ 1.12. "You" (or "Your") means an individual or a legal entity
+ exercising rights under, and complying with all of the terms of, this
+ License or a future version of this License issued under Section 6.1.
+ For legal entities, "You" includes any entity which controls, is
+ controlled by, or is under common control with You. For purposes of
+ this definition, "control" means (a) the power, direct or indirect,
+ to cause the direction or management of such entity, whether by
+ contract or otherwise, or (b) ownership of more than fifty percent
+ (50%) of the outstanding shares or beneficial ownership of such
+ entity.
+
+2. Source Code License.
+
+ 2.1. The Initial Developer Grant.
+ The Initial Developer hereby grants You a world-wide, royalty-free,
+ non-exclusive license, subject to third party intellectual property
+ claims:
+ (a) under intellectual property rights (other than patent or
+ trademark) Licensable by Initial Developer to use, reproduce,
+ modify, display, perform, sublicense and distribute the Original
+ Code (or portions thereof) with or without Modifications, and/or
+ as part of a Larger Work; and
+
+ (b) under Patents Claims infringed by the making, using or
+ selling of Original Code, to make, have made, use, practice,
+ sell, and offer for sale, and/or otherwise dispose of the
+ Original Code (or portions thereof).
+
+ (c) the licenses granted in this Section 2.1(a) and (b) are
+ effective on the date Initial Developer first distributes
+ Original Code under the terms of this License.
+
+ (d) Notwithstanding Section 2.1(b) above, no patent license is
+ granted: 1) for code that You delete from the Original Code; 2)
+ separate from the Original Code; or 3) for infringements caused
+ by: i) the modification of the Original Code or ii) the
+ combination of the Original Code with other software or devices.
+
+ 2.2. Contributor Grant.
+ Subject to third party intellectual property claims, each Contributor
+ hereby grants You a world-wide, royalty-free, non-exclusive license
+
+ (a) under intellectual property rights (other than patent or
+ trademark) Licensable by Contributor, to use, reproduce, modify,
+ display, perform, sublicense and distribute the Modifications
+ created by such Contributor (or portions thereof) either on an
+ unmodified basis, with other Modifications, as Covered Code
+ and/or as part of a Larger Work; and
+
+ (b) under Patent Claims infringed by the making, using, or
+ selling of Modifications made by that Contributor either alone
+ and/or in combination with its Contributor Version (or portions
+ of such combination), to make, use, sell, offer for sale, have
+ made, and/or otherwise dispose of: 1) Modifications made by that
+ Contributor (or portions thereof); and 2) the combination of
+ Modifications made by that Contributor with its Contributor
+ Version (or portions of such combination).
+
+ (c) the licenses granted in Sections 2.2(a) and 2.2(b) are
+ effective on the date Contributor first makes Commercial Use of
+ the Covered Code.
+
+ (d) Notwithstanding Section 2.2(b) above, no patent license is
+ granted: 1) for any code that Contributor has deleted from the
+ Contributor Version; 2) separate from the Contributor Version;
+ 3) for infringements caused by: i) third party modifications of
+ Contributor Version or ii) the combination of Modifications made
+ by that Contributor with other software (except as part of the
+ Contributor Version) or other devices; or 4) under Patent Claims
+ infringed by Covered Code in the absence of Modifications made by
+ that Contributor.
+
+3. Distribution Obligations.
+
+ 3.1. Application of License.
+ The Modifications which You create or to which You contribute are
+ governed by the terms of this License, including without limitation
+ Section 2.2. The Source Code version of Covered Code may be
+ distributed only under the terms of this License or a future version
+ of this License released under Section 6.1, and You must include a
+ copy of this License with every copy of the Source Code You
+ distribute. You may not offer or impose any terms on any Source Code
+ version that alters or restricts the applicable version of this
+ License or the recipients' rights hereunder. However, You may include
+ an additional document offering the additional rights described in
+ Section 3.5.
+
+ 3.2. Availability of Source Code.
+ Any Modification which You create or to which You contribute must be
+ made available in Source Code form under the terms of this License
+ either on the same media as an Executable version or via an accepted
+ Electronic Distribution Mechanism to anyone to whom you made an
+ Executable version available; and if made available via Electronic
+ Distribution Mechanism, must remain available for at least twelve (12)
+ months after the date it initially became available, or at least six
+ (6) months after a subsequent version of that particular Modification
+ has been made available to such recipients. You are responsible for
+ ensuring that the Source Code version remains available even if the
+ Electronic Distribution Mechanism is maintained by a third party.
+
+ 3.3. Description of Modifications.
+ You must cause all Covered Code to which You contribute to contain a
+ file documenting the changes You made to create that Covered Code and
+ the date of any change. You must include a prominent statement that
+ the Modification is derived, directly or indirectly, from Original
+ Code provided by the Initial Developer and including the name of the
+ Initial Developer in (a) the Source Code, and (b) in any notice in an
+ Executable version or related documentation in which You describe the
+ origin or ownership of the Covered Code.
+
+ 3.4. Intellectual Property Matters
+ (a) Third Party Claims.
+ If Contributor has knowledge that a license under a third party's
+ intellectual property rights is required to exercise the rights
+ granted by such Contributor under Sections 2.1 or 2.2,
+ Contributor must include a text file with the Source Code
+ distribution titled "LEGAL" which describes the claim and the
+ party making the claim in sufficient detail that a recipient will
+ know whom to contact. If Contributor obtains such knowledge after
+ the Modification is made available as described in Section 3.2,
+ Contributor shall promptly modify the LEGAL file in all copies
+ Contributor makes available thereafter and shall take other steps
+ (such as notifying appropriate mailing lists or newsgroups)
+ reasonably calculated to inform those who received the Covered
+ Code that new knowledge has been obtained.
+
+ (b) Contributor APIs.
+ If Contributor's Modifications include an application programming
+ interface and Contributor has knowledge of patent licenses which
+ are reasonably necessary to implement that API, Contributor must
+ also include this information in the LEGAL file.
+
+ (c) Representations.
+ Contributor represents that, except as disclosed pursuant to
+ Section 3.4(a) above, Contributor believes that Contributor's
+ Modifications are Contributor's original creation(s) and/or
+ Contributor has sufficient rights to grant the rights conveyed by
+ this License.
+
+ 3.5. Required Notices.
+ You must duplicate the notice in Exhibit A in each file of the Source
+ Code. If it is not possible to put such notice in a particular Source
+ Code file due to its structure, then You must include such notice in a
+ location (such as a relevant directory) where a user would be likely
+ to look for such a notice. If You created one or more Modification(s)
+ You may add your name as a Contributor to the notice described in
+ Exhibit A. You must also duplicate this License in any documentation
+ for the Source Code where You describe recipients' rights or ownership
+ rights relating to Covered Code. You may choose to offer, and to
+ charge a fee for, warranty, support, indemnity or liability
+ obligations to one or more recipients of Covered Code. However, You
+ may do so only on Your own behalf, and not on behalf of the Initial
+ Developer or any Contributor. You must make it absolutely clear than
+ any such warranty, support, indemnity or liability obligation is
+ offered by You alone, and You hereby agree to indemnify the Initial
+ Developer and every Contributor for any liability incurred by the
+ Initial Developer or such Contributor as a result of warranty,
+ support, indemnity or liability terms You offer.
+
+ 3.6. Distribution of Executable Versions.
+ You may distribute Covered Code in Executable form only if the
+ requirements of Section 3.1-3.5 have been met for that Covered Code,
+ and if You include a notice stating that the Source Code version of
+ the Covered Code is available under the terms of this License,
+ including a description of how and where You have fulfilled the
+ obligations of Section 3.2. The notice must be conspicuously included
+ in any notice in an Executable version, related documentation or
+ collateral in which You describe recipients' rights relating to the
+ Covered Code. You may distribute the Executable version of Covered
+ Code or ownership rights under a license of Your choice, which may
+ contain terms different from this License, provided that You are in
+ compliance with the terms of this License and that the license for the
+ Executable version does not attempt to limit or alter the recipient's
+ rights in the Source Code version from the rights set forth in this
+ License. If You distribute the Executable version under a different
+ license You must make it absolutely clear that any terms which differ
+ from this License are offered by You alone, not by the Initial
+ Developer or any Contributor. You hereby agree to indemnify the
+ Initial Developer and every Contributor for any liability incurred by
+ the Initial Developer or such Contributor as a result of any such
+ terms You offer.
+
+ 3.7. Larger Works.
+ You may create a Larger Work by combining Covered Code with other code
+ not governed by the terms of this License and distribute the Larger
+ Work as a single product. In such a case, You must make sure the
+ requirements of this License are fulfilled for the Covered Code.
+
+4. Inability to Comply Due to Statute or Regulation.
+
+ If it is impossible for You to comply with any of the terms of this
+ License with respect to some or all of the Covered Code due to
+ statute, judicial order, or regulation then You must: (a) comply with
+ the terms of this License to the maximum extent possible; and (b)
+ describe the limitations and the code they affect. Such description
+ must be included in the LEGAL file described in Section 3.4 and must
+ be included with all distributions of the Source Code. Except to the
+ extent prohibited by statute or regulation, such description must be
+ sufficiently detailed for a recipient of ordinary skill to be able to
+ understand it.
+
+5. Application of this License.
+
+ This License applies to code to which the Initial Developer has
+ attached the notice in Exhibit A and to related Covered Code.
+
+6. Versions of the License.
+
+ 6.1. New Versions.
+ Netscape Communications Corporation ("Netscape") may publish revised
+ and/or new versions of the License from time to time. Each version
+ will be given a distinguishing version number.
+
+ 6.2. Effect of New Versions.
+ Once Covered Code has been published under a particular version of the
+ License, You may always continue to use it under the terms of that
+ version. You may also choose to use such Covered Code under the terms
+ of any subsequent version of the License published by Netscape. No one
+ other than Netscape has the right to modify the terms applicable to
+ Covered Code created under this License.
+
+ 6.3. Derivative Works.
+ If You create or use a modified version of this License (which you may
+ only do in order to apply it to code which is not already Covered Code
+ governed by this License), You must (a) rename Your license so that
+ the phrases "Mozilla", "MOZILLAPL", "MOZPL", "Netscape",
+ "MPL", "NPL" or any confusingly similar phrase do not appear in your
+ license (except to note that your license differs from this License)
+ and (b) otherwise make it clear that Your version of the license
+ contains terms which differ from the Mozilla Public License and
+ Netscape Public License. (Filling in the name of the Initial
+ Developer, Original Code or Contributor in the notice described in
+ Exhibit A shall not of themselves be deemed to be modifications of
+ this License.)
+
+7. DISCLAIMER OF WARRANTY.
+
+ COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS,
+ WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF
+ DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING.
+ THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE
+ IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT,
+ YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE
+ COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER
+ OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF
+ ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
+
+8. TERMINATION.
+
+ 8.1. This License and the rights granted hereunder will terminate
+ automatically if You fail to comply with terms herein and fail to cure
+ such breach within 30 days of becoming aware of the breach. All
+ sublicenses to the Covered Code which are properly granted shall
+ survive any termination of this License. Provisions which, by their
+ nature, must remain in effect beyond the termination of this License
+ shall survive.
+
+ 8.2. If You initiate litigation by asserting a patent infringement
+ claim (excluding declatory judgment actions) against Initial Developer
+ or a Contributor (the Initial Developer or Contributor against whom
+ You file such action is referred to as "Participant") alleging that:
+
+ (a) such Participant's Contributor Version directly or indirectly
+ infringes any patent, then any and all rights granted by such
+ Participant to You under Sections 2.1 and/or 2.2 of this License
+ shall, upon 60 days notice from Participant terminate prospectively,
+ unless if within 60 days after receipt of notice You either: (i)
+ agree in writing to pay Participant a mutually agreeable reasonable
+ royalty for Your past and future use of Modifications made by such
+ Participant, or (ii) withdraw Your litigation claim with respect to
+ the Contributor Version against such Participant. If within 60 days
+ of notice, a reasonable royalty and payment arrangement are not
+ mutually agreed upon in writing by the parties or the litigation claim
+ is not withdrawn, the rights granted by Participant to You under
+ Sections 2.1 and/or 2.2 automatically terminate at the expiration of
+ the 60 day notice period specified above.
+
+ (b) any software, hardware, or device, other than such Participant's
+ Contributor Version, directly or indirectly infringes any patent, then
+ any rights granted to You by such Participant under Sections 2.1(b)
+ and 2.2(b) are revoked effective as of the date You first made, used,
+ sold, distributed, or had made, Modifications made by that
+ Participant.
+
+ 8.3. If You assert a patent infringement claim against Participant
+ alleging that such Participant's Contributor Version directly or
+ indirectly infringes any patent where such claim is resolved (such as
+ by license or settlement) prior to the initiation of patent
+ infringement litigation, then the reasonable value of the licenses
+ granted by such Participant under Sections 2.1 or 2.2 shall be taken
+ into account in determining the amount or value of any payment or
+ license.
+
+ 8.4. In the event of termination under Sections 8.1 or 8.2 above,
+ all end user license agreements (excluding distributors and resellers)
+ which have been validly granted by You or any distributor hereunder
+ prior to termination shall survive termination.
+
+9. LIMITATION OF LIABILITY.
+
+ UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT
+ (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL
+ DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE,
+ OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR
+ ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY
+ CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL,
+ WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER
+ COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN
+ INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF
+ LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY
+ RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW
+ PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE
+ EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO
+ THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
+
+10. U.S. GOVERNMENT END USERS.
+
+ The Covered Code is a "commercial item," as that term is defined in
+ 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer
+ software" and "commercial computer software documentation," as such
+ terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48
+ C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995),
+ all U.S. Government End Users acquire Covered Code with only those
+ rights set forth herein.
+
+11. MISCELLANEOUS.
+
+ This License represents the complete agreement concerning subject
+ matter hereof. If any provision of this License is held to be
+ unenforceable, such provision shall be reformed only to the extent
+ necessary to make it enforceable. This License shall be governed by
+ California law provisions (except to the extent applicable law, if
+ any, provides otherwise), excluding its conflict-of-law provisions.
+ With respect to disputes in which at least one party is a citizen of,
+ or an entity chartered or registered to do business in the United
+ States of America, any litigation relating to this License shall be
+ subject to the jurisdiction of the Federal Courts of the Northern
+ District of California, with venue lying in Santa Clara County,
+ California, with the losing party responsible for costs, including
+ without limitation, court costs and reasonable attorneys' fees and
+ expenses. The application of the United Nations Convention on
+ Contracts for the International Sale of Goods is expressly excluded.
+ Any law or regulation which provides that the language of a contract
+ shall be construed against the drafter shall not apply to this
+ License.
+
+12. RESPONSIBILITY FOR CLAIMS.
+
+ As between Initial Developer and the Contributors, each party is
+ responsible for claims and damages arising, directly or indirectly,
+ out of its utilization of rights under this License and You agree to
+ work with Initial Developer and Contributors to distribute such
+ responsibility on an equitable basis. Nothing herein is intended or
+ shall be deemed to constitute any admission of liability.
+
+13. MULTIPLE-LICENSED CODE.
+
+ Initial Developer may designate portions of the Covered Code as
+ "Multiple-Licensed". "Multiple-Licensed" means that the Initial
+ Developer permits you to utilize portions of the Covered Code under
+ Your choice of the NPL or the alternative licenses, if any, specified
+ by the Initial Developer in the file described in Exhibit A.
+
+EXHIBIT A -Mozilla Public License.
+
+ ``The contents of this file are subject to the Mozilla Public License
+ Version 1.1 (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.mozilla.org/MPL/
+
+ Software distributed under the License is distributed on an "AS IS"
+ basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+ License for the specific language governing rights and limitations
+ under the License.
+
+ The Original Code is ______________________________________.
+
+ The Initial Developer of the Original Code is ________________________.
+ Portions created by ______________________ are Copyright (C) ______
+ _______________________. All Rights Reserved.
+
+ Contributor(s): ______________________________________.
+
+ Alternatively, the contents of this file may be used under the terms
+ of the _____ license (the "[___] License"), in which case the
+ provisions of [______] License are applicable instead of those
+ above. If you wish to allow use of your version of this file only
+ under the terms of the [____] License and not to allow others to use
+ your version of this file under the MPL, indicate your decision by
+ deleting the provisions above and replace them with the notice and
+ other provisions required by the [___] License. If you do not delete
+ the provisions above, a recipient may use your version of this file
+ under either the MPL or the [___] License."
+
+ [NOTE: The text of this Exhibit A may differ slightly from the text of
+ the notices in the Source Code files of the Original Code. You should
+ use the text of this Exhibit A rather than the text found in the
+ Original Code Source Code for Your Modifications.]
diff --git a/js-ext/firebug/firebug-lite-compressed.js b/js-ext/firebug/firebug-lite-compressed.js
index af2c05dc..abd035ad 100755
--- a/js-ext/firebug/firebug-lite-compressed.js
+++ b/js-ext/firebug/firebug-lite-compressed.js
@@ -1,118 +1,118 @@
-var firebug={version:[1.23,20090309],el:{},env:{"cache":{},"extConsole":null,"css":"http://getfirebug.com/releases/lite/1.2/firebug-lite.css","debug":true,"detectFirebug":false,"dIndex":"console","height":295,"hideDOMFunctions":false,"init":false,"isPopup":false,"liteFilename":"firebug-lite.js","minimized":false,"openInPopup":false,"override":false,"ml":false,"popupWin":null,"showIconWhenHidden":true,"targetWindow":undefined,"popupTop":1,"popupLeft":1,"popupWidth":undefined,"popupHeight":undefined},initConsole:function(){var command;try{if((!window.console||(window.console&&!window.console.firebug))||(firebug.env.override&&!(/Firefox\/3/i.test(navigator.userAgent)))){window.console={"provider":"Firebug Lite"};for(command in firebug.d.console.cmd){window.console[command]=firebug.lib.util.Curry(firebug.d.console.run,window,command);};}
-window.onerror=function(_message,_file,_line){firebug.d.console.run('error',firebug.lib.util.String.format('{0} ({1},{2})',_message,firebug.getFileName(_file),_line));};}catch(e){}},overrideConsole:function(){with(firebug){env.override=true;try{env.extConsole=window.console;}catch(e){}
-initConsole();}},restoreConsole:function(){with(firebug){if(env.extConsole){env.override=false;try{window.console=env.extConsole;}catch(e){}
-env.extConsole=null;}}},init:function(_css){var iconTitle="Click here or press F12, (CTRL|CMD)+SHIFT+L or SHIFT+ENTER to show Firebug Lite. CTRL|CMD click this icon to hide it.";with(firebug){if(document.getElementsByTagName('html')[0].attributes.getNamedItem('debug')){env.debug=document.getElementsByTagName('html')[0].attributes.getNamedItem('debug').nodeValue!=="false";}
-if(env.isPopup){env.openInPopup=false;env.targetWindow=window.opener;env.popupWidth=window.opener.firebug.env.popupWidth||window.opener.firebug.lib.util.GetViewport().width;env.popupHeight=window.opener.firebug.env.popupHeight||window.opener.firebug.lib.util.GetViewport().height;}else{env.targetWindow=window;env.popupWidth=env.popupWidth||lib.util.GetViewport().width;env.popupHeight=env.popupHeight||lib.util.GetViewport().height;}
-settings.readCookie();if(env.init||(env.detectFirebug&&window.console&&window.console.firebug)){return;}
-document.getElementsByTagName("head")[0].appendChild(new lib.element("link").attribute.set("rel","stylesheet").attribute.set("type","text/css").attribute.set("href",env.css).element);if(env.override){overrideConsole();}
-el.firebugIcon=new lib.element("div").attribute.set("id","firebugIconDiv").attribute.set("title",iconTitle).attribute.set("alt",iconTitle).event.addListener("mousedown",win.iconClicked).insert(document.body);el.content={};el.mainiframe=new lib.element("IFRAME").attribute.set("id","FirebugIFrame").environment.addStyle({"display":"none","width":lib.util.GetViewport().width+"px"}).insert(document.body);el.main=new lib.element("DIV").attribute.set("id","Firebug").environment.addStyle({"display":"none","width":lib.util.GetViewport().width+"px"}).insert(document.body);if(!env.isPopup){el.resizer=new lib.element("DIV").attribute.addClass("Resizer").event.addListener("mousedown",win.resizer.start).insert(el.main);}
-el.header=new lib.element("DIV").attribute.addClass("Header").insert(el.main);el.left={};el.left.container=new lib.element("DIV").attribute.addClass("Left").insert(el.main);el.right={};el.right.container=new lib.element("DIV").attribute.addClass("Right").insert(el.main);el.main.child.add(new lib.element("DIV").attribute.addClass('Clear'));el.button={};el.button.container=new lib.element("DIV").attribute.addClass("ButtonContainer").insert(el.header);el.button.logo=new lib.element("A").attribute.set("title","Firebug Lite").attribute.set("target","_blank").attribute.set("href","http://getfirebug.com/lite.html").update(" ").attribute.addClass("Button Logo").insert(el.button.container);el.button.inspect=new lib.element("A").attribute.addClass("Button").event.addListener("click",env.targetWindow.firebug.d.inspector.toggle).update("Inspect").insert(el.button.container);el.button.dock=new lib.element("A").attribute.addClass("Button Dock").event.addListener("click",win.dock).insert(el.button.container);el.button.newWindow=new lib.element("A").attribute.addClass("Button NewWindow").event.addListener("click",win.newWindow).insert(el.button.container);if(!env.isPopup){el.button.maximize=new lib.element("A").attribute.addClass("Button Maximize").event.addListener("click",win.maximize).insert(el.button.container);el.button.minimize=new lib.element("A").attribute.addClass("Button Minimize").event.addListener("click",win.minimize).insert(el.button.container);el.button.close=new lib.element("A").attribute.addClass("Button Close").event.addListener("click",win.hide).insert(el.button.container);}
-if(lib.env.ie||lib.env.webkit){el.button.container.environment.addStyle({"paddingTop":"12px"});}
-el.nav={};el.nav.container=new lib.element("DIV").attribute.addClass("Nav").insert(el.left.container);el.nav.console=new lib.element("A").attribute.addClass("Tab Selected").event.addListener("click",lib.util.Curry(d.navigate,window,"console")).update("Console").insert(el.nav.container);el.nav.html=new lib.element("A").attribute.addClass("Tab").update("HTML").event.addListener("click",lib.util.Curry(d.navigate,window,"html")).insert(el.nav.container);el.nav.css=new lib.element("A").attribute.addClass("Tab").update("CSS").event.addListener("click",lib.util.Curry(d.navigate,window,"css")).insert(el.nav.container);if(!env.isPopup){el.nav.scripts=new lib.element("A").attribute.addClass("Tab").update("Script").event.addListener("click",lib.util.Curry(d.navigate,window,"scripts")).insert(el.nav.container);}
-el.nav.dom=new lib.element("A").attribute.addClass("Tab").update("DOM").event.addListener("click",lib.util.Curry(d.navigate,env.targetWindow,"dom")).insert(el.nav.container);el.nav.xhr=new lib.element("A").attribute.addClass("Tab").update("XHR").event.addListener("click",lib.util.Curry(d.navigate,window,"xhr")).insert(el.nav.container);el.nav.optionsdiv=new lib.element("DIV").attribute.addClass("Settings").insert(el.nav.container);el.nav.options=new lib.element("A").attribute.addClass("Tab").update("Options ∨").event.addListener("click",settings.toggle).insert(el.nav.optionsdiv);el.borderInspector=new lib.element("DIV").attribute.set("id","FirebugBorderInspector").event.addListener("click",listen.inspector).insert(document.body);el.bgInspector=new lib.element("DIV").attribute.set("id","FirebugBGInspector").insert(document.body);el.left.console={};el.left.console.container=new lib.element("DIV").attribute.addClass("Console").insert(el.left.container);el.left.console.mlButton=new lib.element("A").attribute.addClass("MLButton").event.addListener("click",d.console.toggleML).insert(el.left.console.container);el.left.console.monitor=new lib.element("DIV").insert(new lib.element("DIV").attribute.addClass("Monitor").insert(el.left.console.container));el.left.console.container.child.add(new lib.element("DIV").attribute.addClass("InputArrow").update(">>>"));el.left.console.input=new lib.element("INPUT").attribute.set("type","text").attribute.addClass("Input").event.addListener("keydown",listen.consoleTextbox).insert(new lib.element("DIV").attribute.addClass("InputContainer").insert(el.left.console.container));el.right.console={};el.right.console.container=new lib.element("DIV").attribute.addClass("Console Container").insert(el.right.container);el.right.console.mlButton=new lib.element("A").attribute.addClass("MLButton CloseML").event.addListener("click",d.console.toggleML).insert(el.right.console.container);el.right.console.input=new lib.element("TEXTAREA").attribute.addClass("Input").insert(el.right.console.container);el.right.console.input.event.addListener("keydown",lib.util.Curry(tab,window,el.right.console.input.element));el.right.console.run=new lib.element("A").attribute.addClass("Button").event.addListener("click",listen.runMultiline).update("Run").insert(el.right.console.container);el.right.console.clear=new lib.element("A").attribute.addClass("Button").event.addListener("click",lib.util.Curry(d.clean,window,el.right.console.input)).update("Clear").insert(el.right.console.container);el.button.console={};el.button.console.container=new lib.element("DIV").attribute.addClass("ButtonSet").insert(el.button.container);el.button.console.clear=new lib.element("A").attribute.addClass("Button").event.addListener("click",d.console.clear).update("Clear").insert(el.button.console.container);el.left.html={};el.left.html.container=new lib.element("DIV").attribute.addClass("HTML").insert(el.left.container);el.right.html={};el.right.html.container=new lib.element("DIV").attribute.addClass("HTML Container").insert(el.right.container);el.right.html.nav={};el.right.html.nav.container=new lib.element("DIV").attribute.addClass("Nav").insert(el.right.html.container);el.right.html.nav.computedStyle=new lib.element("A").attribute.addClass("Tab Selected").event.addListener("click",lib.util.Curry(d.html.navigate,firebug,"computedStyle")).update("Computed Style").insert(el.right.html.nav.container);el.right.html.nav.dom=new lib.element("A").attribute.addClass("Tab").event.addListener("click",lib.util.Curry(d.html.navigate,firebug,"dom")).update("DOM").insert(el.right.html.nav.container);el.right.html.content=new lib.element("DIV").attribute.addClass("Content").insert(el.right.html.container);el.button.html={};el.button.html.container=new lib.element("DIV").attribute.addClass("ButtonSet HTML").insert(el.button.container);el.left.css={};el.left.css.container=new lib.element("DIV").attribute.addClass("CSS").insert(el.left.container);el.right.css={};el.right.css.container=new lib.element("DIV").attribute.addClass("CSS Container").insert(el.right.container);el.right.css.nav={};el.right.css.nav.container=new lib.element("DIV").attribute.addClass("Nav").insert(el.right.css.container);el.right.css.nav.runCSS=new lib.element("A").attribute.addClass("Tab Selected").update("Run CSS").insert(el.right.css.nav.container);el.right.css.mlButton=new lib.element("A").attribute.addClass("MLButton CloseML").event.addListener("click",d.console.toggleML).insert(el.right.css.container);el.right.css.input=new lib.element("TEXTAREA").attribute.addClass("Input").insert(el.right.css.container);el.right.css.input.event.addListener("keydown",lib.util.Curry(firebug.tab,window,el.right.css.input.element));el.right.css.run=new lib.element("A").attribute.addClass("Button").event.addListener("click",listen.runCSS).update("Run").insert(el.right.css.container);el.right.css.clear=new lib.element("A").attribute.addClass("Button").event.addListener("click",lib.util.Curry(d.clean,window,el.right.css.input)).update("Clear").insert(el.right.css.container);el.button.css={};el.button.css.container=new lib.element("DIV").attribute.addClass("ButtonSet CSS").insert(el.button.container);el.button.css.selectbox=new lib.element("SELECT").event.addListener("change",listen.cssSelectbox).insert(el.button.css.container);el.left.scripts={};el.left.scripts.container=new lib.element("DIV").attribute.addClass("Scripts").insert(el.left.container);el.right.scripts={};el.right.scripts.container=new lib.element("DIV").attribute.addClass("Scripts Container").insert(el.right.container);el.button.scripts={};el.button.scripts.container=new lib.element("DIV").attribute.addClass("ButtonSet Scripts").insert(el.button.container);el.button.scripts.selectbox=new lib.element("SELECT").event.addListener("change",listen.scriptsSelectbox).insert(el.button.scripts.container);el.button.scripts.lineNumbers=new lib.element("A").attribute.addClass("Button").event.addListener("click",d.scripts.toggleLineNumbers).update("Show Line Numbers").insert(el.button.scripts.container);el.left.dom={};el.left.dom.container=new lib.element("DIV").attribute.addClass("DOM").insert(el.left.container);el.right.dom={};el.right.dom.container=new lib.element("DIV").attribute.addClass("DOM Container").insert(el.right.container);el.button.dom={};el.button.dom.container=new lib.element("DIV").attribute.addClass("ButtonSet DOM").insert(el.button.container);el.button.dom.label=new lib.element("LABEL").update("Object Path:").insert(el.button.dom.container);el.button.dom.textbox=new lib.element("INPUT").event.addListener("keydown",listen.domTextbox).update(env.isPopup?"window.opener":"window").insert(el.button.dom.container);el.left.str={};el.left.str.container=new lib.element("DIV").attribute.addClass("STR").insert(el.left.container);el.right.str={};el.right.str.container=new lib.element("DIV").attribute.addClass("STR").insert(el.left.container);el.button.str={};el.button.str.container=new lib.element("DIV").attribute.addClass("ButtonSet XHR").insert(el.button.container);el.button.str.watch=new lib.element("A").attribute.addClass("Button").event.addListener("click",lib.util.Curry(d.navigate,window,"xhr")).update("Back").insert(el.button.str.container);el.left.xhr={};el.left.xhr.container=new lib.element("DIV").attribute.addClass("XHR").insert(el.left.container);el.right.xhr={};el.right.xhr.container=new lib.element("DIV").attribute.addClass("XHR").insert(el.left.container);el.button.xhr={};el.button.xhr.container=new lib.element("DIV").attribute.addClass("ButtonSet XHR").insert(el.button.container);el.button.xhr.label=new lib.element("LABEL").update("XHR Path:").insert(el.button.xhr.container);el.button.xhr.textbox=new lib.element("INPUT").event.addListener("keydown",listen.xhrTextbox).insert(el.button.xhr.container);el.button.xhr.watch=new lib.element("A").attribute.addClass("Button").event.addListener("click",listen.addXhrObject).update("Watch").insert(el.button.xhr.container);el.settings={};el.settings.container=new lib.element("DIV").child.add(new lib.element("DIV").attribute.addClass("Header").child.add(new lib.element().attribute.addClass("Title").update('Firebug Lite Settings'))).attribute.addClass("SettingsDiv").insert(el.main);el.settings.content=new lib.element("DIV").attribute.addClass("Content").insert(el.settings.container);el.settings.progressDiv=new lib.element("DIV").attribute.addClass("ProgressDiv").insert(el.settings.content);el.settings.progress=new lib.element("DIV").attribute.addClass("Progress").insert(el.settings.progressDiv);el.settings.cbxDebug=new lib.element("INPUT").attribute.set("type","checkbox").attribute.addClass("SettingsCBX").insert(el.settings.content);el.settings.content.child.add(document.createTextNode("Start visible"));new lib.element("BR").insert(el.settings.content);el.settings.cbxDetectFirebug=new lib.element("INPUT").attribute.set("type","checkbox").attribute.addClass("SettingsCBX").insert(el.settings.content);el.settings.content.child.add(document.createTextNode("Hide when Firebug active"));new lib.element("BR").insert(el.settings.content);el.settings.cbxHideDOMFunctions=new lib.element("INPUT").attribute.set("type","checkbox").attribute.addClass("SettingsCBX").insert(el.settings.content);el.settings.content.child.add(document.createTextNode("Hide DOM functions"));new lib.element("BR").insert(el.settings.content);el.settings.cbxOverride=new lib.element("INPUT").attribute.set("type","checkbox").attribute.addClass("SettingsCBX").insert(el.settings.content);el.settings.content.child.add(document.createTextNode("Override window.console"));new lib.element("BR").insert(el.settings.content);el.settings.cbxShowIcon=new lib.element("INPUT").attribute.set("type","checkbox").attribute.addClass("SettingsCBX").insert(el.settings.content);el.settings.content.child.add(document.createTextNode("Show icon when hidden"));new lib.element("BR").insert(el.settings.content);el.settings.cbxOpenInPopup=new lib.element("INPUT").attribute.set("type","checkbox").attribute.addClass("SettingsCBX").insert(el.settings.content);el.settings.content.child.add(document.createTextNode("Open in popup"));el.settings.buttonDiv=new lib.element("DIV").insert(el.settings.content);el.settings.buttonLeftDiv=new lib.element("DIV").attribute.addClass("ButtonsLeft").insert(el.settings.buttonDiv);el.settings.resetButton=new lib.element("INPUT").attribute.set("type","button").update("Reset").event.addListener("click",settings.reset).insert(el.settings.buttonLeftDiv);el.settings.buttonRightDiv=new lib.element("DIV").attribute.addClass("ButtonsRight").insert(el.settings.buttonDiv);el.settings.cancelButton=new lib.element("INPUT").attribute.set("type","button").update("Cancel").event.addListener("click",settings.hide).insert(el.settings.buttonRightDiv);el.settings.buttonRightDiv.child.add(document.createTextNode(" "));el.settings.saveButton=new lib.element("INPUT").attribute.set("type","button").update("Save").event.addListener("click",settings.saveClicked).insert(el.settings.buttonRightDiv);lib.util.AddEvent(document,"mousemove",listen.mouse)("mousemove",win.resizer.resize)("mouseup",win.resizer.stop)("keydown",listen.keyboard);env.init=true;for(var i=0,len=d.console.cache.length;i0){cookieArr=targetWindow.document.cookie.split('; ');for(i=0;i-1){scriptPath=scripts[i].src;break;}}
-if(scriptPath){script=fe.popupWin.document.createElement('script'),done=false;script.type='text/javascript';script.src=scriptPath;script[firebug.lib.env.ie?"onreadystatechange":"onload"]=function(){if(!done&&(!firebug.lib.env.ie||this.readyState=="complete"||this.readyState=="loaded")){done=true;if(fe.popupWin.firebug){with(fe.popupWin.firebug){env.isPopup=true;env.css=fe.css;init();el.button.dock.environment.addStyle({"display":"block"});el.button.newWindow.environment.addStyle({"display":"none"});}}}};if(!done&&firebug.lib.env.webkit){fe.popupWin.document.write('');interval=setInterval(function(){if(fe.popupWin.firebug){clearInterval(interval);done=true;with(fe.popupWin.firebug){env.isPopup=true;env.css=fe.css;init();el.button.dock.environment.addStyle({"display":"block"});el.button.newWindow.environment.addStyle({"display":"none"});}}},10);};if(!done){fe.popupWin.document.getElementsByTagName('head')[0].appendChild(script);firebug.el.main.environment.addStyle({"display":"none"});firebug.el.mainiframe.environment.addStyle({"display":"none"});}}else{alert("Unable to detect the following script \""+fe.liteFilename+"\" ... if the script has been renamed then please set the value of firebug.env.liteFilename to reflect this change");fe.popupWin.close();fe.popupWin=null;}}}},dock:function(){with(opener.firebug){env.popupWin=null;el.main.environment.addStyle({"display":"block"});el.mainiframe.environment.addStyle({"display":"block"});settings.readCookie();window.close();};},unload:function(){with(firebug){if(env.isPopup){win.dock();}else if(env.popupWin){env.popupWin.close();}}},fitToPopup:function(){with(firebug){var viewport=lib.util.GetViewport(window);win.setHeight((window.innerHeight||viewport.height)-38);el.main.environment.addStyle({"width":(viewport.width)+"px"});el.mainiframe.environment.addStyle({"width":(viewport.width)+"px"});}},resizer:{y:[],enabled:false,start:function(_event){with(firebug){if(env.minimized)return;win.resizer.y=[el.main.element.offsetHeight,_event.clientY];if(lib.env.ie6){win.resizer.y[3]=parseInt(el.main.environment.getPosition().top);}
-win.resizer.enabled=true;}},resize:function(_event){with(firebug){if(!win.resizer.enabled)return;win.resizer.y[2]=(win.resizer.y[0]+(win.resizer.y[1]-_event.clientY));el.main.environment.addStyle({"height":win.resizer.y[2]+"px"});el.mainiframe.environment.addStyle({"height":win.resizer.y[2]+"px"});if(lib.env.ie6){el.main.environment.addStyle({"top":win.resizer.y[3]-(win.resizer.y[1]-_event.clientY)+"px"});el.mainiframe.environment.addStyle({"top":win.resizer.y[3]-(win.resizer.y[1]-_event.clientY)+"px"});}}},stop:function(_event){with(firebug){if(win.resizer.enabled){win.resizer.enabled=false;win.setHeight(win.resizer.y[2]-35);}}}},setHeight:function(_height){with(firebug){env.height=_height;el.left.container.environment.addStyle({"height":_height+"px"});el.right.container.environment.addStyle({"height":_height+"px"});el.main.environment.addStyle({"height":_height+38+"px"});el.mainiframe.environment.addStyle({"height":_height+38+"px"});win.refreshSize();el.left.console.monitor.element.parentNode.style.height=_height-47+"px";el.left.console.mlButton.environment.addStyle({"top":_height+19+"px"});el.right.console.mlButton.environment.addStyle({"top":_height+19+"px"});el.right.console.input.environment.addStyle({"height":_height-29+"px"});el.left.html.container.environment.addStyle({"height":_height-23+"px"});el.right.html.content.environment.addStyle({"height":_height-23+"px"});el.left.css.container.environment.addStyle({"height":_height-33+"px"});el.right.css.input.environment.addStyle({"height":_height-55+"px"});el.left.scripts.container.environment.addStyle({"height":_height-23+"px"});el.left.dom.container.environment.addStyle({"height":_height-31+"px"});el.left.xhr.container.environment.addStyle({"height":_height-32+"px"});el.left.str.container.environment.addStyle({"height":_height-32+"px"});}},refreshDOM:function(){with(firebug){d.dom.open(eval(el.button.dom.textbox.environment.getElement().value),el.left.dom.container);if(d.html.nIndex=="dom"){firebug.d.html.navigate("dom")}}},refreshSize:function(){with(firebug){if(!env.init)
-return;var dim=lib.util.GetViewport();el.main.environment.addStyle({"width":dim.width+"px"});el.mainiframe.environment.addStyle({"width":dim.width+"px"});if(lib.env.ie6)
-win.setVerticalPosition(dim);}},setVerticalPosition:function(_dim,_event){with(firebug){var dim=_dim||lib.util.GetViewport();el.main.environment.addStyle({"top":dim.height-el.main.environment.getSize().offsetHeight+Math.max(document.documentElement.scrollTop,document.body.scrollTop)+"px"});el.mainiframe.environment.addStyle({"top":dim.height-el.main.environment.getSize().offsetHeight+Math.max(document.documentElement.scrollTop,document.body.scrollTop)+"px"});}}},d:{clean:function(_element){with(firebug){_element.update("");}},console:{addLine:function(){with(firebug){return new lib.element("DIV").attribute.addClass("Row").insert(el.left.console.monitor);}},cache:[],clear:function(){with(firebug){d.clean(el.left.console.monitor);d.console.cache=[];}},formatArgs:function(){with(firebug){var content=[];for(var i=0,len=arguments.length;i>> "+_cmd);d.console.addLine().update(d.highlight(_text,false,false,true));d.console.scroll();}},printException:function(_exception){with(firebug){var message=_exception.description||_exception.message||_exception;if(_exception.fileName){message+=' ('+(_exception.name&&(_exception.name+', ')||'')+getFileName(_exception.fileName)+', '+_exception.lineNumber+')';}
-d.console.addLine().attribute.addClass("Error").update("Error: "+message,true);}},eval:function(_cmd){var result;with(firebug){if(_cmd.length==0)
-return;el.left.console.input.environment.getElement().value="";d.console.historyIndex=d.console.history.push(_cmd);try{if(_cmd==='console.firebug'){d.console.addLine().attribute.addClass("Arrow").update(firebug.version);}else{result=eval.call(window,_cmd);d.console.print(_cmd,result);}}catch(e){d.console.addLine().attribute.addClass("Arrow").update(">>> "+_cmd);d.console.printException(e);}
-d.console.scroll();}},scroll:function(){with(firebug){el.left.console.monitor.environment.getElement().parentNode.scrollTop=Math.abs(el.left.console.monitor.environment.getSize().offsetHeight-(el.left.console.monitor.element.parentNode.offsetHeight-11));}},run:function(_command){with(firebug){if(!env.init){d.console.cache.push({"command":_command,"arg":Array.prototype.slice.call(arguments,1)});}else{d.console.cmd[_command].apply(window,Array.prototype.slice.call(arguments,1));}}},toggleML:function(){with(firebug){var open=!env.ml;env.ml=!env.ml;d.navigateRightColumn("console",open);el[open?"left":"right"].console.mlButton.environment.addStyle({display:"none"});el[!open?"left":"right"].console.mlButton.environment.addStyle({display:"block"});el.left.console.mlButton.attribute[(open?"add":"remove")+"Class"]("CloseML");}},countMap:{},timeMap:{},cmd:{log:function(_value){with(firebug){var args=d.console.formatArgs.apply(window,arguments);d.console.addLine().attribute.addClass("Log").update(args);d.console.scroll();}},warn:function(_value){with(firebug){var args=d.console.formatArgs.apply(window,arguments);d.console.addLine().attribute.addClass("Warn").update(args);d.console.scroll();}},info:function(_value){with(firebug){var args=d.console.formatArgs.apply(window,arguments);d.console.addLine().attribute.addClass("Info").update(args);d.console.scroll();}},debug:function(_value){with(firebug){var args=d.console.formatArgs.apply(window,arguments);d.console.addLine().attribute.addClass("Debug").update(args);d.console.scroll();}},error:function(_value){with(firebug){var args=d.console.formatArgs.apply(window,arguments);d.console.addLine().attribute.addClass("Error").update(args);d.console.scroll();}},trace:function(_value){with(firebug){var stackAmt=3,f=arguments.caller,isArray=lib.util.IsArray(f);if((!isArray&&f)||(isArray&&f.length>0)){d.console.addLine().attribute.addClass("Arrow").update(">>> console.trace(stack)");for(var i=0;i>> console.dir("+_value+")");d.dom.open(_value,d.console.addLine());}},dirxml:function(){with(firebug){d.console.cmd.log.apply(this,arguments);}},time:function(_name){with(firebug){d.console.timeMap[_name]=new Date().getTime();}},timeEnd:function(_name){with(firebug){if(_name in d.console.timeMap){var delta=new Date().getTime()-d.console.timeMap[_name],args=d.console.formatArgs.apply(window,[_name+":",delta+"ms"]);d.console.addLine().attribute.addClass("log").update(args);delete d.console.timeMap[_name];}}},count:function(_name){with(firebug){if(!d.console.countMap[_name])
-d.console.countMap[_name]=0;d.console.countMap[_name]++;d.console.cmd.log.apply(window,[_name,d.console.countMap[_name]]);}},group:function(){with(firebug){d.console.cmd.log.apply(this,["console.group is not supported"]);}},groupEnd:function(){with(firebug){d.console.cmd.log.apply(this,["console.groupEnd is not supported"]);}},profile:function(){with(firebug){d.console.cmd.log.apply(this,["console.profile is not supported"]);}},profileEnd:function(){with(firebug){d.console.cmd.log.apply(this,["console.profileEnd is not supported"]);}}}},css:{index:-1,open:function(_index){with(firebug){var item=env.targetWindow.document.styleSheets[_index],uri=item.href;try{var rules=item[lib.env.ie?"rules":"cssRules"],str="";for(var i=0;iAccess to restricted URI denied";}
-el.left.css.container.update(str);}},printRule:function(_selector,_css,_layer){with(firebug){var str="
A Boolean indicating whether to remove all jQuery variables from the global scope (including jQuery itself).
-
-
-
-
Many JavaScript libraries use $ as a function or variable name, just as jQuery does. In jQuery's case, $ is just an alias for jQuery, so all functionality is available without using $. If you need to use another JavaScript library alongside jQuery, return control of $ back to the other library with a call to $.noConflict(). Old references of $ are saved during jQuery initialization; noConflict() simply restores them.
-
If for some reason two versions of jQuery are loaded (which is not recommended), calling $.noConflict( true ) from the second version will return the globally scoped jQuery variables to those of the first version.
-
-
-
-
-
-
-
1
-
-
2
-
-
3
-
-
4
-
-
5
-
-
6
-
-
-
-
<scriptsrc="other_lib.js"></script>
<scriptsrc="jquery.js"></script>
<script>
$.noConflict();
// Code that uses other library's $ can follow here.
</script>
-
-
-
-
-
-
-
This technique is especially effective in conjunction with the .ready() method's ability to alias the jQuery object, as within callback passed to .ready() you can use $ if you wish without fear of conflicts later:
-
-
-
-
-
-
-
1
-
-
2
-
-
3
-
-
4
-
-
5
-
-
6
-
-
7
-
-
8
-
-
9
-
-
-
-
<scriptsrc="other_lib.js"></script>
<scriptsrc="jquery.js"></script>
<script>
$.noConflict();
jQuery( document ).ready(function( $ ) {
// Code that uses jQuery's $ can follow here.
});
// Code that uses other library's $ can follow here.
</script>
-
-
-
-
-
-
-
If necessary, you can free up the jQuery name as well by passing true
- as an argument to the method. This is rarely necessary, and if you must
- do this (for example, if you need to use multiple versions of the
-jQuery library on the same page), you need to consider that most
-plug-ins rely on the presence of the jQuery variable and may not operate correctly in this situation.
-
-
Examples:
-
Example: Map the original object that was referenced by $ back to $.
-
-
-
-
-
-
-
-
1
-
-
2
-
-
3
-
-
4
-
-
5
-
-
-
-
jQuery.noConflict();
// Do something with jQuery
jQuery( "div p" ).hide();
// Do something with another library's $()
$( "content" ).style.display = "none";
-
-
-
-
-
-
-
-
-
Example: Revert the $ alias and then create and
-execute a function to provide the $ as a jQuery alias inside the
-function's scope. Inside the function the original $ object is not
-available. This works well for most plugins that don't rely on any other
- library.
-
-
-
-
-
-
-
-
-
1
-
-
2
-
-
3
-
-
4
-
-
5
-
-
6
-
-
7
-
-
8
-
-
-
-
jQuery.noConflict();
(function( $ ) {
$(function() {
// More code using $ as alias to jQuery
});
})(jQuery);
// Other code using $ as an alias to the other library
-
-
-
-
-
-
-
-
-
Example: Create a different alias instead of jQuery to use in the rest of the script.
-
-
-
-
-
-
-
-
1
-
-
2
-
-
3
-
-
4
-
-
5
-
-
6
-
-
7
-
-
-
-
var j = jQuery.noConflict();
// Do something with jQuery
j( "div p" ).hide();
// Do something with another library's $()
$( "content" ).style.display = "none";
-
-
-
-
-
-
-
-
-
Example: Completely move jQuery to a new namespace in another object.
-
-
-
-
-
-
-
-
1
-
-
2
-
-
-
-
var dom = {};
dom.query = jQuery.noConflict( true );
-
-
-
-
-
-
-
Result:
-
-
-
-
-
-
-
1
-
-
2
-
-
3
-
-
4
-
-
5
-
-
6
-
-
7
-
-
8
-
-
-
-
// Do something with the new jQuery
dom.query( "div p" ).hide();
// Do something with another library's $()
$( "content" ).style.display = "none";
// Do something with another version of jQuery
jQuery( "div > p" ).hide();
-
-
-
-
-
-
-
-
-
Example: Load two versions of jQuery (not recommended). Then, restore jQuery's globally scoped variables to the first loaded jQuery.
-
A Boolean indicating whether to remove all jQuery variables from the global scope (including jQuery itself).
+
+
+
+
Many JavaScript libraries use $ as a function or variable name, just as jQuery does. In jQuery's case, $ is just an alias for jQuery, so all functionality is available without using $. If you need to use another JavaScript library alongside jQuery, return control of $ back to the other library with a call to $.noConflict(). Old references of $ are saved during jQuery initialization; noConflict() simply restores them.
+
If for some reason two versions of jQuery are loaded (which is not recommended), calling $.noConflict( true ) from the second version will return the globally scoped jQuery variables to those of the first version.
+
+
+
+
+
+
+
1
+
+
2
+
+
3
+
+
4
+
+
5
+
+
6
+
+
+
+
<scriptsrc="other_lib.js"></script>
<scriptsrc="jquery.js"></script>
<script>
$.noConflict();
// Code that uses other library's $ can follow here.
</script>
+
+
+
+
+
+
+
This technique is especially effective in conjunction with the .ready() method's ability to alias the jQuery object, as within callback passed to .ready() you can use $ if you wish without fear of conflicts later:
+
+
+
+
+
+
+
1
+
+
2
+
+
3
+
+
4
+
+
5
+
+
6
+
+
7
+
+
8
+
+
9
+
+
+
+
<scriptsrc="other_lib.js"></script>
<scriptsrc="jquery.js"></script>
<script>
$.noConflict();
jQuery( document ).ready(function( $ ) {
// Code that uses jQuery's $ can follow here.
});
// Code that uses other library's $ can follow here.
</script>
+
+
+
+
+
+
+
If necessary, you can free up the jQuery name as well by passing true
+ as an argument to the method. This is rarely necessary, and if you must
+ do this (for example, if you need to use multiple versions of the
+jQuery library on the same page), you need to consider that most
+plug-ins rely on the presence of the jQuery variable and may not operate correctly in this situation.
+
+
Examples:
+
Example: Map the original object that was referenced by $ back to $.
+
+
+
+
+
+
+
+
1
+
+
2
+
+
3
+
+
4
+
+
5
+
+
+
+
jQuery.noConflict();
// Do something with jQuery
jQuery( "div p" ).hide();
// Do something with another library's $()
$( "content" ).style.display = "none";
+
+
+
+
+
+
+
+
+
Example: Revert the $ alias and then create and
+execute a function to provide the $ as a jQuery alias inside the
+function's scope. Inside the function the original $ object is not
+available. This works well for most plugins that don't rely on any other
+ library.
+
+
+
+
+
+
+
+
+
1
+
+
2
+
+
3
+
+
4
+
+
5
+
+
6
+
+
7
+
+
8
+
+
+
+
jQuery.noConflict();
(function( $ ) {
$(function() {
// More code using $ as alias to jQuery
});
})(jQuery);
// Other code using $ as an alias to the other library
+
+
+
+
+
+
+
+
+
Example: Create a different alias instead of jQuery to use in the rest of the script.
+
+
+
+
+
+
+
+
1
+
+
2
+
+
3
+
+
4
+
+
5
+
+
6
+
+
7
+
+
+
+
var j = jQuery.noConflict();
// Do something with jQuery
j( "div p" ).hide();
// Do something with another library's $()
$( "content" ).style.display = "none";
+
+
+
+
+
+
+
+
+
Example: Completely move jQuery to a new namespace in another object.
+
+
+
+
+
+
+
+
1
+
+
2
+
+
+
+
var dom = {};
dom.query = jQuery.noConflict( true );
+
+
+
+
+
+
+
Result:
+
+
+
+
+
+
+
1
+
+
2
+
+
3
+
+
4
+
+
5
+
+
6
+
+
7
+
+
8
+
+
+
+
// Do something with the new jQuery
dom.query( "div p" ).hide();
// Do something with another library's $()
$( "content" ).style.display = "none";
// Do something with another version of jQuery
jQuery( "div > p" ).hide();
+
+
+
+
+
+
+
+
+
Example: Load two versions of jQuery (not recommended). Then, restore jQuery's globally scoped variables to the first loaded jQuery.
+