Skip to content

Commit

Permalink
fix: automatic formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
f-necas committed Nov 15, 2023
1 parent 6c05b7a commit 111ee24
Show file tree
Hide file tree
Showing 55 changed files with 334 additions and 345 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,6 @@
$http
.get("info?_content_type=json&" + "type=groupsIncludingSystemGroups", {
cache: true

})
.then(function (response) {
scope.groups = response.data !== "null" ? response.data.group : null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,15 +136,16 @@
uitype: updated.uitype,
uivalue: updated.uivalue
}
})
.then(
}).then(
function (response) {
updateCacheOnCriteriaChange(group.id.schematronid, group.id.name);

angular.copy(updated, original);
},function (response) {
},
function (response) {
alert("Error updating criteria: " + original.id);
});
}
);
},
add: function (criteria, original, group) {
$http({
Expand Down Expand Up @@ -266,15 +267,16 @@
includeCriteria: true,
schematronId: schematronId
}
})
.then(function (response) {
}).then(
function (response) {
var data = response.data;
if (data === "null") {
data = [];
}
putDataIntoCache(groupCacheId(schematronId), data);
successFunction(data);
},function (response) {
},
function (response) {
alert(
"Error occurred during loading schematron criteria " +
" groups for schematron: " +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,22 +133,23 @@
cache: true,
timeout: REQUEST_TIMEOUT
})
.then(function (response) {
try {
defer.resolve(parseProjDef(response.data));
} catch (e) {
console.error(e);
defer.reject($translate.instant("failedToParseProjDefinition"));
}
},
function (response) {
defer.reject(
$translate.instant(
response.status === 401
? "checkProjectionUrlUnauthorized"
: "checkProjectionUrl",
{ url: url, status: response.status }
)
.then(
function (response) {
try {
defer.resolve(parseProjDef(response.data));
} catch (e) {
console.error(e);
defer.reject($translate.instant("failedToParseProjDefinition"));
}
},
function (response) {
defer.reject(
$translate.instant(
response.status === 401
? "checkProjectionUrlUnauthorized"
: "checkProjectionUrl",
{ url: url, status: response.status }
)
);
}
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -664,7 +664,6 @@

var record = this;


if (angular.isDefined(record.geom) && !angular.isArray(record.geom)) {
record.geom = [record.geom];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,7 @@
url = url + "&removeId=" + tagsToRemove.join("&removeId=");
}

$http
.put(url).then(
$http.put(url).then(
function (response) {
var data = response.data;
scope.processReport = data;
Expand All @@ -140,7 +139,8 @@

scope.report = data;
defer.resolve(data);
},function (response) {
},
function (response) {
scope.processReport = response.data;

gnUtilityService.openModal(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1992,10 +1992,11 @@
if (!createOnly) {
map.addLayer(olL);
}
olL.set(
olL.set(
"layerTitleFromMetadata",
$this.getLinkDescription(olL.get("md"), url, name)
); gnWmsQueue.removeFromQueue(url, name, map);
);
gnWmsQueue.removeFromQueue(url, name, map);
defer.resolve(olL);
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@
<br />
<div class="btn-group-vertical">
<button
class="btn btn-default "
class="btn btn-default"
data-ng-click="select()"
data-ng-disabled="readonlyMode"
>
<i class="fa fa-angle-right"></i>
</button>
<button
class="btn btn-default "
class="btn btn-default"
data-ng-click="unselect()"
data-ng-disabled="readonlyMode"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,10 @@
}
});


window.addEventListener(
window.addEventListener(
"resize",
function (event) {
gnDebounce(refreshData, 50, true);
gnDebounce(refreshData, 50, true);
},
true
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,7 @@
* Out callback function.
* @type {function()}
*/
var outCallback =
options.outCallback !== undefined ? options.outCallback : null;
var outCallback = options.outCallback !== undefined ? options.outCallback : null;

/**
* Distance data extractor used to get the dist values.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,8 @@
$(".popover").hide();
};

var mouseLeft = false;var initTooltip = function (event) {
var mouseLeft = false;
var initTooltip = function (event) {
if (!isInitialized && gnCurrentEdit.displayTooltips) {
// Retrieve field information (there is a cache)
gnSchemaManagerService
Expand Down Expand Up @@ -376,11 +377,12 @@
$(this).closest("div.popover").remove();
});

if (event === "click" && !isField) {
tooltipTarget.click("show");
} else {
tooltipTarget.focus();
}}
if (event === "click" && !isField) {
tooltipTarget.click("show");
} else {
tooltipTarget.focus();
}
}

if (tooltipsMode === "icon") {
tooltipTarget.mouseleave(function () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,40 +22,37 @@
</div>
</div>

<div class="pull-right"
ng-if="!ctrl.readOnly"
>
<div class="pull-right">
<label class="text-muted control-label" translate>drawOnMap</label>
<br />
<div gi-btn-group>
<div class="pull-right" ng-if="!ctrl.readOnly">
<div class="pull-right">
<label class="text-muted control-label" translate>drawOnMap</label>
<br />
<div gi-btn-group>
<div class="btn-group">
<div class="btn-group">
<div class="btn-group">
<button
class="btn btn-default"
gi-btn="active"
ng-model="ctrl.drawInteraction.active"
>
<span class="fa fa-pencil"></span>&nbsp;
<span translate>Polygon</span>
</button>
<button
class="btn btn-default"
gi-btn="active"
ng-model="ctrl.drawLineInteraction.active"

> <span class="fa fa-pencil"></span>&nbsp;
<span translate>Line</span>
</button>
</div>
<button
class="btn btn-default"
gi-btn="active"
ng-model="ctrl.drawInteraction.active"
>
<span class="fa fa-pencil"></span>&nbsp;
<span translate>Polygon</span>
</button>
<button
class="btn btn-default"
gi-btn="active"
ng-model="ctrl.drawLineInteraction.active"
>
<span class="fa fa-pencil"></span>&nbsp;
<span translate>Line</span>
</button>
</div>
<button
class="btn btn-default"
gi-btn="active"
ng-model="ctrl.modifyInteraction.active"


> <span class="fa fa-pencil"></span>&nbsp;
</div>
<button
class="btn btn-default"
gi-btn="active"
ng-model="ctrl.modifyInteraction.active"
>
<span class="fa fa-pencil"></span>&nbsp;
<span translate>modifyGeometry</span>
</button>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,11 +180,12 @@

// Default to empty string and prevent 'Invalid Date' string to xmlSnippet
scope.date = "";
if (moment(isDateTime ? tokens[0] : scope.value).isValid()) {scope.date = new Date(
moment(isDateTime ? tokens[0] : scope.value)
.utc()
.format()
);
if (moment(isDateTime ? tokens[0] : scope.value).isValid()) {
scope.date = new Date(
moment(isDateTime ? tokens[0] : scope.value)
.utc()
.format()
);
}

var time = tokens[1];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@
class="form-control"
data-ng-model="config.selected"
data-ng-options="o as o['#text'] disable when o.disabled for o in config.option"

></select>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -266,9 +266,11 @@
scope.resource.title,
scope.resource["abstract"]
)
.then(function (response) {
.then(
function (response) {
readResponse(response.data, "publish");
},function (response) {
},
function (response) {
scope.statusCode = response.data.description;
scope.isPublished = false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -885,7 +885,8 @@
scope.isEditing = angular.isDefined(linkToEdit);
// Flag used when editing an online resource to prevent the watcher to update the online
// resource description when loading the dialog.
scope.processSelectedWMSLayer = false;scope.codelistFilter =
scope.processSelectedWMSLayer = false;
scope.codelistFilter =
scope.gnCurrentEdit && scope.gnCurrentEdit.codelistFilter;

scope.metadataId = gnCurrentEdit.id;
Expand Down Expand Up @@ -1491,7 +1492,8 @@
return;
}

if (o !== n &&
if (
o !== n &&
scope.params.selectedLayers &&
scope.params.selectedLayers.length > 0
) {
Expand All @@ -1509,20 +1511,18 @@
descs.push(layer.Title || layer.title);
});


if (scope.isMdMultilingual) {
var langCode = scope.mdLangs[scope.mdLang];
scope.params.name[langCode] = names.join(",");
scope.params.desc[langCode] = descs.join(",");
} else {
angular.extend(scope.params, {
name: names.join(","),
desc: descs.join(",")
});
}
if (scope.isMdMultilingual) {
var langCode = scope.mdLangs[scope.mdLang];
scope.params.name[langCode] = names.join(",");
scope.params.desc[langCode] = descs.join(",");
} else {
angular.extend(scope.params, {
name: names.join(","),
desc: descs.join(",")
});
}
}
);
});

/**
* Init link based on linkType configuration.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@
class="btn navbar-btn btn-success"
data-gn-click-and-spin="gnOnlinesrc.linkToMd(mode, selectRecords[0], popupid)"
ng-disabled="(selectRecords.length < 1)"

> <i class="fa gn-icon-{{mode}}" />
<i class="icon-external-link"></i>&nbsp; {{btn.label}}
>
<i class="fa gn-icon-{{mode}}" /> <i class="icon-external-link"></i>&nbsp;
{{btn.label}}
</button>
<div data-gn-need-help="linking-records" class="pull-right"></div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@
data-gn-confirm-click="{{'removeThumbnailConfirm' | translate:{url: thumb.lUrl} }}"
title="{{'removeThumbnail' | translate}}"
aria-label="{{'removeThumbnail' | translate}}"

>
<i class="fa fa-times text-danger"></i>
</a>
Expand All @@ -111,7 +110,6 @@
data-ng-show="allowEdits"
title="{{'edit' | translate}}"
data-ng-click="onlinesrcService.onOpenPopup('onlinesrc', thumb)"

>
<i class="fa fa-pencil"></i>
</a>
Expand Down
Loading

0 comments on commit 111ee24

Please sign in to comment.