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

Using CreateElement for adding HTML #12907

Merged
merged 2 commits into from
Jan 20, 2017

Conversation

ShreyasSinha
Copy link
Contributor

@ShreyasSinha ShreyasSinha commented Jan 20, 2017

#12764
Before submitting pull request, please check that every commit:

  • Has proper Signed-Off-By
  • Has commit message which describes it
  • Is needed on it's own, if you have just minor fixes to previous commits, you can squash them
  • Any new functionality is covered by tests

@codecov-io
Copy link

codecov-io commented Jan 20, 2017

Current coverage is 54.18% (diff: 100%)

Merging #12907 into master will not change coverage

@@             master     #12907   diff @@
==========================================
  Files           466        466          
  Lines         69619      69619          
  Methods        2126       2126          
  Messages          0          0          
  Branches          0          0          
==========================================
  Hits          37724      37724          
  Misses        31895      31895          
  Partials          0          0          

Powered by Codecov. Last update 3d056bc...ad0e0aa

Signed-off-by: Shreyas Sinha <shreyas.sinha14@gmail.com>
var version_information_message_link = document.createElement('a');
version_information_message_link.href = url;
version_information_message_link.class = 'disableAjax';
version_information_message_link.innerHTML = escapeHtml(data.version);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be better to use text here to avoid need for escapeHtml....

}
var $liPmaVersion = $('#li_pma_version');
$liPmaVersion.find('span.latest').remove();
$liPmaVersion.append(version_information_message);
document.getElementById("li_pma_version").appendChild(version_information_message);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why getting element again, while we already have it as $liPmaVersion?

Signed-off-by: Shreyas Sinha <shreyas.sinha14@gmail.com>
@nijel nijel merged commit 278836e into phpmyadmin:master Jan 20, 2017
@nijel
Copy link
Contributor

nijel commented Jan 20, 2017

Merged, thanks for your contribution!

@nijel nijel added this to the 4.7.0 milestone Jan 20, 2017
@ShreyasSinha ShreyasSinha deleted the refactorcreateelement branch January 20, 2017 17:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants