Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide unneeded show/hide separate tabs for Json and UmpleSelf. Fixes #1719 #1732

Merged
merged 3 commits into from Jun 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion umpleonline/scripts/allumple-min.js

Large diffs are not rendered by default.

47 changes: 22 additions & 25 deletions umpleonline/scripts/umple_action.js
Expand Up @@ -1768,14 +1768,6 @@ Action.setCaretPosition = function(line)
Page.setFeedbackMessage("Debug Mode");
return;
}
if(line=="tc")
{ // resets cookies for tips
Page.setFeedbackMessage("Clearing tip cookies");
let currentTime=new Date();
currentTime.setTime(currentTime.getTime()-1000);
window.localStorage.removeItem("first_time");
document.cookie="tipCookie=done; expires="+currentTime.toUTCString()+"; path=/;";
}
if(line.substr(0,2)=="cm")
{
if(line.substr(2,1)=="0" && Page.codeMirrorOn)
Expand Down Expand Up @@ -2908,23 +2900,28 @@ Mousetrap.bind(['c'], function(e){

Action.toggleTabsCheckbox = function(language)
{
// Workaround for TextUml having java prefix
if($("inputGenerateCode").value.split(":")[1] == "TextUml"){
language = "TextUml";
}

if(language == "java" || language == "php" || language == "cpp"
|| language == "ruby" || language == "sql"){
jQuery("#ttTabsCheckbox").show();
jQuery("#tabRow").show();
}
else{
jQuery("#ttTabsCheckbox").hide();
jQuery("#tabRow").hide();
if(jQuery('#buttonTabsCheckbox').is(':checked')){
jQuery('#buttonTabsCheckbox').click();
}
}
// Workaround for TextUml having java prefix
if($("inputGenerateCode").value.split(":")[1] == "TextUml"){
language = "TextUml";
}

if(language == "java" || language == "php" || language == "cpp"
|| language == "ruby" || language == "sql") {
jQuery("#ttTabsCheckbox").show();
jQuery("#tabRow").show();

if ($("inputGenerateCode").value.split(":")[1] == "UmpleSelf" || $("inputGenerateCode").value.split(":")[1] == "Json") {
jQuery("#ttTabsCheckbox").hide();
jQuery("#tabRow").hide();
}
}
else {
jQuery("#ttTabsCheckbox").hide();
jQuery("#tabRow").hide();
if(jQuery('#buttonTabsCheckbox').is(':checked')){
jQuery('#buttonTabsCheckbox').click();
}
}
}

// Function for splitting code into tabs for every new file, activated when checking the Show Tabs checkbox
Expand Down