Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/geocat_stable' into geocat_trunk
Browse files Browse the repository at this point in the history
  • Loading branch information
Jesse Eichar committed Oct 25, 2012
2 parents ce56a34 + 752d616 commit 9423e90
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 20 deletions.
4 changes: 2 additions & 2 deletions jmeter/src/main/resources/jmeter_test_plan.jmx
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<jmeterTestPlan version="1.2" properties="2.3">
<jmeterTestPlan version="1.2" properties="2.3" jmeter="2.8 r1393162">
<hashTree>
<TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Quick Search Test Plan" enabled="true">
<stringProp name="TestPlan.comments"></stringProp>
Expand Down Expand Up @@ -482,7 +482,7 @@
</hashTree>
</hashTree>
</hashTree>
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Edit Group" enabled="true">
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Edit Group" enabled="false">
<stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
<elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
<boolProp name="LoopController.continue_forever">false</boolProp>
Expand Down
42 changes: 24 additions & 18 deletions web/src/main/webapp/scripts/reusable-validate.js
@@ -1,15 +1,14 @@
var locUrl;
var editWin;
var msgWin;
var msgWinSubmit;
var grid;
var rejectBtnDefaultTxt;
var dataStore;
var metadataWindow;

function get(prefix, id) {
var div = Ext.get(prefix + id);
if (div == null) {
if (div === null) {
div = Ext.get(prefix + "contacts");
}
return div;
Expand All @@ -23,7 +22,7 @@ function show(id, buttonTxt) {
dataStore.proxy.conn.url = locUrl + '/reusable.non_validated.list?type=' + id;
dataStore.load();

if (id == 'deleted') {
if (id === 'deleted') {
Ext.get('validate').hide();
Ext.get('edit').hide();
Ext.get('reject').update(buttonTxt);
Expand All @@ -36,7 +35,7 @@ function showDeletePage(buttonTxt) {

function editWindows(url) {
var localPrefix = "local://";
if (url.indexOf(localPrefix) == 0) {
if (url.indexOf(localPrefix) === 0) {
url = Env.host + Env.locService + '/' + url.substring(localPrefix.length);
}
editWin = window.open(url,"_reusableObjectsEdit");
Expand All @@ -45,7 +44,7 @@ function editWindows(url) {
function checked() {
var results = "";
grid.getSelectionModel().each(function (record) {
if (results.length > 0) results += ','
if (results.length > 0) results += ',';
results += record.data.id;

});
Expand All @@ -55,17 +54,17 @@ function checked() {
function reject(button, submitLabel, cancelLabel) {
var numChecked = checked();

if (numChecked == 0) {
if (numChecked === 0) {
return;
}
if (currentPage() == 'deleted') {
if (currentPage() === 'deleted') {
var box = Ext.MessageBox.confirm("Delete Object?", "Are you sure you want to delete the selected objects?", function (choice) {
if (choice == 'yes') {
if (choice === 'yes') {
performOperation("reusable.delete");
}
});
} else {
if (msgWin == null) {
if (msgWin === null) {
msgWin = new Ext.Window({
applyTo: 'msg_win',
layout: 'fit',
Expand Down Expand Up @@ -110,11 +109,11 @@ function performOperation(operation, msg, noSelection) {
noSelection = noSelection === undefined ? false : noSelection;
var params = [];
params.id = checked();
if (params.id.length == 0 && !noSelection) return;
if (params.id.length === 0 && !noSelection) return;
var page = currentPage();
params.type = page;

if (msg != null) {
if (msg !== null) {
params.msg = msg;
}

Expand Down Expand Up @@ -245,10 +244,17 @@ function createGrid() {


function loadReferencingMetadata(record, body) {
var rowHeight = Ext.get(grid.view.getRow(dataStore.indexOf(record))).getHeight();
var containingRow = Ext.get(grid.view.getRow(dataStore.indexOf(record)));
var rowHeight = containingRow.getHeight();
var rowWidth = containingRow.getWidth() - 50; // id is 50 pixels

var idWidth = 50;
var titleWidth = rowWidth * 0.4;
var nameWidth = rowWidth * 0.25;
var emailWidth = rowWidth * 0.35;

var store = new Ext.data.Store({
url: locUrl + '/reusable.references?id=' + record.data['id'] + '&type=' + currentPage(),
url: locUrl + '/reusable.references?id=' + record.data.id + '&type=' + currentPage(),
reader: new Ext.data.XmlReader({
record: 'record',
id: 'id'
Expand All @@ -259,24 +265,24 @@ function loadReferencingMetadata(record, body) {
store: store,
columns: [{
header: "id",
width: 50,
width: idWidth,
dataIndex: 'id',
sortable: true
}, {
header: "title",
width: 500,
width: titleWidth,
fixed: true,
dataIndex: 'title',
sortable: true
}, {
header: "name",
width: 120,
width: nameWidth,
fixed: true,
dataIndex: 'name',
sortable: true
}, {
header: "email",
width: 120,
width: emailWidth,
fixed: true,
dataIndex: 'email',
sortable: true
Expand Down Expand Up @@ -318,7 +324,7 @@ function loadReferencingMetadata(record, body) {


store.load();
};
}

function showMetadata(row, record) {

Expand Down

0 comments on commit 9423e90

Please sign in to comment.