Advertisement
Guest User

Untitled

a guest
Jan 20th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.16 KB | None | 0 0
  1. </div>
  2. <div class="features form-group">
  3. <input class="filestyle form-control margin" data-input="false" type="file" data-buttonText="Upload Logo"
  4. data-size="sm" data-badge="false" onchange="readURL(this);" />
  5. <!--<button onClick=" updateDatabase(this);"</button>-->
  6. <button style="display: none" class="form-control margin btn btn-primary" id="showColor">Show Colors</button>
  7. <button style="display: none" class="form-control margin btn btn-primary" id="hideColor">Hide Colors</button>
  8. <input style="display: none" class="btn btn-default form-control margin" type="color" id="colorChoice">
  9. <a style="display: none" href="#" class="btn btn-default form-control margin" id="cp4">Background</a>
  10. <button style="display: none" onclick="$('#fonts1').bfhfonts({font: 'Arial'})" id="fontsShow" class="btn btn-primary form-control margin">Load Fonts</button>
  11. <button style="display: none" class="btn btn-primary form-control margin" id="fontsHide">Hide Fonts</button>
  12. <select style="display: none" data-font="Arial" id="fonts1" class="form-control margin"></select>
  13. <button style="display: none" onclick="$('#googlefonts1').bfhgooglefonts({font: 'Lato'})" id="googleShow" class="btn btn-primary form-control margin">Google fonts</button>
  14. <button style="display: none" class="btn btn-primary form-control margin" id="googleHide">Hide Google</button>
  15. <select style="display: none" id="googlefonts1" class="form-control margin"></select>
  16. <button style="display: none" class="form-control margin btn btn-default" id="finishEdit">Done</button>
  17. <button class="form-control margin btn btn-default" id="startEdit">Edit</button>
  18. </div>
  19. <div id="content-link2"><html>
  20. <head>
  21. <title>Template 1</title>
  22. <link href="http://localhost/fyproject/public/templates/css.css" rel="stylesheet" type="text/css">
  23. </head>
  24. <body>
  25. <div class="logo">
  26. <img class="images" id="image" src="#" alt="Your Logo"/>
  27. </div>
  28. <div contenteditable="true" id="content" class="draggable ui-widget-content refresh"><p>Change Text inside this box</p></div>
  29.  
  30. <div id ="editTxt" class="refresh" contenteditable="true">
  31. <p>This text can be by the user.</p>
  32. </div>
  33. </body>
  34. </html></div>
  35.  
  36. $( "#showColor" ).click(function() {
  37. $( "#colorChoice" ).show( "slow" );
  38. $( "#cp4" ).show( "slow" );
  39. $( "#hideColor" ).show( "slow" );
  40. $( "#showColor" ).hide( "slow" );
  41. });
  42. $( "#hideColor" ).click(function() {
  43. $( "#hideColor" ).hide( 1000 );
  44. $( "#colorChoice" ).hide( "slow" );
  45. $( "#cp4" ).hide( "slow" );
  46. $( "#showColor" ).show( "slow" );
  47. });
  48. $( "#fontsShow" ).click(function() {
  49. $( "#fonts1" ).show( "slow" );
  50. $( "#googleShow").show( "slow" );
  51. $( "#fontsHide" ).show( "slow" );
  52. $( "#fontsShow" ).hide( "slow" );
  53. });
  54. $( "#googleShow" ).click(function() {
  55. $( "#googlefonts1" ).show( "slow" );
  56. $( "#googleHide" ).show( "slow" );
  57. $( "#googleShow" ).hide( "slow" );
  58. });
  59. $( "#googleHide" ).click(function() {
  60. $( "#googleHide" ).hide( "slow" );
  61. $( "#googleShow" ).show( "slow" );
  62. $( "#googlefonts1" ).hide( "slow" );
  63. });
  64. $( "#fontsHide" ).click(function() {
  65. $( "#fonts1" ).hide( "slow" );
  66. $( "#googleShow").hide( "slow" );
  67. $( "#googlefonts1").hide( "slow" );
  68. $( "#fontsShow" ).show( "slow" );
  69. $( "#fontsHide" ).hide( "slow" );
  70. });
  71. $(function() {
  72. $('#cp4').colorpicker().on('changeColor', function(e) {
  73. $('#content-link2')[0].style.backgroundColor = e.color.toString(
  74. 'rgba');
  75. });
  76. });
  77. $(document).ready(function() {
  78. $("#startEdit").click(function () {
  79. if ($("#startEdit").on('click')) {
  80. $(document).ready(function() {
  81. var font;
  82. $("#fonts1").on("change", function(){
  83. font = $(this).val();
  84. });
  85. $("#content-link2").on("click", "*", function() {
  86. $(this).css('font-family',font);
  87. });
  88. });
  89. $(document).ready(function() {
  90. var gfont;
  91. $("#googlefonts1").on("change", function(){
  92. gfont = $(this).val();
  93. });
  94. $("#content-link2").on("click", "*", function() {
  95. $(this).css('font-family',gfont);
  96. });
  97. });
  98. $(document).ready(function() {
  99. var color;
  100. $("#colorChoice").on('input', function(){
  101. color = $(this).val();
  102. });
  103. $('#content-link2').on('click', '*', function() {
  104. $(this).css('background',color);
  105. });
  106. });
  107. } else {
  108. $( "#content-link2" ).off( "click" );
  109. }
  110. });
  111. });
  112. $("#startEdit").on('click', function() {
  113. $( "#fontsShow" ).show( "click" );
  114. $( "#showColor").show( "click" );
  115. $( "#finishEdit").show( "click" );
  116. $( "#startEdit").hide( "click" );
  117. });
  118. $("#finishEdit").on('click', function() {
  119. $( "#startEdit" ).show( "slow" );
  120. $( "#fontsShow" ).hide( "click" );
  121. $( "#showColor").hide( "click" );
  122. $( "#finishEdit" ).hide( "slow" );
  123. $( "#fonts1" ).hide( "slow" );
  124. $( "#fontsHide" ).hide( "slow" );
  125. $( "#hideColor" ).hide( 1000 );
  126. $( "#colorChoice" ).hide( "slow" );
  127. $( "#cp4" ).hide( "slow" );
  128. $( "#googleShow" ).hide( "slow" );
  129. $( "#googleHide" ).hide( "slow" );
  130. $( "#googlefonts1" ).hide( "slow" );
  131. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement