Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
justinfreeman (Agileware)
Core
Commits
d2c45957
Commit
d2c45957
authored
12 years ago
by
colemanw
Browse files
Options
Downloads
Patches
Plain Diff
js/whitespace cleanup
parent
b4172122
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
templates/CRM/Contact/Form/Search/AdvancedCriteria.tpl
+56
-56
56 additions, 56 deletions
templates/CRM/Contact/Form/Search/AdvancedCriteria.tpl
with
56 additions
and
56 deletions
templates/CRM/Contact/Form/Search/AdvancedCriteria.tpl
+
56
−
56
View file @
d2c45957
...
...
@@ -27,63 +27,63 @@
{
literal
}
<script
type=
"text/javascript"
>
cj
(
function
(
$
)
{
$
(
document
).
ready
(
function
()
{
$
().
crmAccordions
();
// Bind first click of accordion header to load crm-accordion-body with snippet
// everything else is taken care of by crmAccordions()
$
(
'
.crm-search_criteria_basic-accordion .crm-accordion-header
'
).
addClass
(
'
active
'
);
$
(
'
.crm-ajax-accordion
'
).
on
(
'
click
'
,
'
.crm-accordion-header:not(.active)
'
,
function
()
{
loadPanes
(
$
(
this
).
attr
(
'
id
'
));
});
$
(
'
.crm-ajax-accordion:not(.collapsed) .crm-accordion-header
'
).
each
(
function
()
{
loadPanes
(
$
(
this
).
attr
(
'
id
'
));
});
$
(
'
.crm-ajax-accordion
'
).
on
(
'
click
'
,
'
.crm-close-accordion
'
,
function
()
{
var
header
=
$
(
this
).
parent
();
header
.
next
().
html
(
''
);
header
.
removeClass
(
'
active
'
);
header
.
parent
(
'
.crm-ajax-accordion:not(.collapsed)
'
).
crmAccordionToggle
();
// Reset results-display mode if it depends on this pane
var
mode
=
modes
[
$
(
'
#component_mode
'
).
val
()]
||
null
;
if
(
mode
&&
header
.
attr
(
'
id
'
)
==
mode
)
{
var
oldMode
=
$
(
'
#component_mode :selected
'
).
text
();
$
(
'
#component_mode
'
).
val
(
'
1
'
);
{/
literal
}
var
msg
=
'
{
ts
escape
=
"js"
}
Displaying results as "%1" is not available without search criteria from the pane you just closed.
{/
ts
}
'
;
msg
=
msg
.
replace
(
'
%1
'
,
oldMode
);
CRM
.
alert
(
msg
,
'
{
ts
escape
=
"js"
}
Display Results have been Reset
{/
ts
}
'
);
{
literal
}
}
$
(
this
).
remove
();
return
false
;
});
// TODO: Why are the modes numeric? If they used the string there would be no need for this map
var
modes
=
{
'
2
'
:
'
CiviContribute
'
,
'
3
'
:
'
CiviEvent
'
,
'
4
'
:
'
activity
'
,
'
5
'
:
'
CiviMember
'
,
'
6
'
:
'
CiviCase
'
,
};
// Handle change of results mode
$
(
'
#component_mode
'
).
change
(
function
()
{
// Reset task dropdown
$
(
'
#task
'
).
val
(
''
);
var
mode
=
modes
[
$
(
'
#component_mode
'
).
val
()]
||
null
;
if
(
mode
)
{
$
(
'
.crm-
'
+
mode
+
'
-accordion.collapsed
'
).
crmAccordionToggle
();
loadPanes
(
mode
);
}
if
(
$
(
'
#component_mode
'
).
val
()
==
'
7
'
)
{
$
(
'
#crm-display_relationship_type
'
).
show
();
}
else
{
$
(
'
#display_relationship_type
'
).
val
(
''
);
$
(
'
#crm-display_relationship_type
'
).
hide
();
}
}).
change
();
$
().
crmAccordions
();
// Bind first click of accordion header to load crm-accordion-body with snippet
// everything else is taken care of by crmAccordions()
$
(
'
.crm-search_criteria_basic-accordion .crm-accordion-header
'
).
addClass
(
'
active
'
);
$
(
'
.crm-ajax-accordion
'
).
on
(
'
click
'
,
'
.crm-accordion-header:not(.active)
'
,
function
()
{
loadPanes
(
$
(
this
).
attr
(
'
id
'
));
});
// Loads snippet based on id of crm-accordion-header
$
(
'
.crm-ajax-accordion:not(.collapsed) .crm-accordion-header
'
).
each
(
function
()
{
loadPanes
(
$
(
this
).
attr
(
'
id
'
));
});
$
(
'
.crm-ajax-accordion
'
).
on
(
'
click
'
,
'
.crm-close-accordion
'
,
function
()
{
var
header
=
$
(
this
).
parent
();
header
.
next
().
html
(
''
);
header
.
removeClass
(
'
active
'
);
header
.
parent
(
'
.crm-ajax-accordion:not(.collapsed)
'
).
crmAccordionToggle
();
// Reset results-display mode if it depends on this pane
var
mode
=
modes
[
$
(
'
#component_mode
'
).
val
()]
||
null
;
if
(
mode
&&
header
.
attr
(
'
id
'
)
==
mode
)
{
var
oldMode
=
$
(
'
#component_mode :selected
'
).
text
();
$
(
'
#component_mode
'
).
val
(
'
1
'
);
{/
literal
}
var
msg
=
'
{
ts
escape
=
"js"
}
Displaying results as "%1" is not available without search criteria from the pane you just closed.
{/
ts
}
'
;
msg
=
msg
.
replace
(
'
%1
'
,
oldMode
);
CRM
.
alert
(
msg
,
'
{
ts
escape
=
"js"
}
Display Results have been Reset
{/
ts
}
'
);
{
literal
}
}
$
(
this
).
remove
();
return
false
;
});
// TODO: Why are the modes numeric? If they used the string there would be no need for this map
var
modes
=
{
'
2
'
:
'
CiviContribute
'
,
'
3
'
:
'
CiviEvent
'
,
'
4
'
:
'
activity
'
,
'
5
'
:
'
CiviMember
'
,
'
6
'
:
'
CiviCase
'
,
};
// Handle change of results mode
$
(
'
#component_mode
'
).
change
(
function
()
{
// Reset task dropdown
$
(
'
#task
'
).
val
(
''
);
var
mode
=
modes
[
$
(
'
#component_mode
'
).
val
()]
||
null
;
if
(
mode
)
{
$
(
'
.crm-
'
+
mode
+
'
-accordion.collapsed
'
).
crmAccordionToggle
();
loadPanes
(
mode
);
}
if
(
$
(
'
#component_mode
'
).
val
()
==
'
7
'
)
{
$
(
'
#crm-display_relationship_type
'
).
show
();
}
else
{
$
(
'
#display_relationship_type
'
).
val
(
''
);
$
(
'
#crm-display_relationship_type
'
).
hide
();
}
}).
change
();
/**
* Loads snippet based on id of crm-accordion-header
*/
function
loadPanes
(
id
)
{
var
url
=
"
{/
literal
}{
crmURL
p
=
'civicrm/contact/search/advanced'
q
=
"snippet=1&qfKey=`$qfKey`&searchPane="
h
=
0
}{
literal
}
"
+
id
;
var
header
=
$
(
'
#
'
+
id
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment