পৃষ্ঠাসমূহ

Search Your Article

CS

 

Welcome to GoogleDG – your one-stop destination for free learning resources, guides, and digital tools.

At GoogleDG, we believe that knowledge should be accessible to everyone. Our mission is to provide readers with valuable ebooks, tutorials, and tech-related content that makes learning easier, faster, and more enjoyable.

What We Offer:

  • 📘 Free & Helpful Ebooks – covering education, technology, self-development, and more.

  • 💻 Step-by-Step Tutorials – practical guides on digital tools, apps, and software.

  • 🌐 Tech Updates & Tips – simplified information to keep you informed in the fast-changing digital world.

  • 🎯 Learning Support – resources designed to support students, professionals, and lifelong learners.

    Latest world News 

     

Our Vision

To create a digital knowledge hub where anyone, from beginners to advanced learners, can find trustworthy resources and grow their skills.

Why Choose Us?

✔ Simple explanations of complex topics
✔ 100% free access to resources
✔ Regularly updated content
✔ A community that values knowledge sharing

We are continuously working to expand our content library and provide readers with the most useful and relevant digital learning materials.

📩 If you’d like to connect, share feedback, or suggest topics, feel free to reach us through the Contact page.

Pageviews

Saturday, February 18, 2017

Framework7 - Message Bar

Description

Framework7 provides special resizable toolbar to work with the messaging system in the application.
The following code shows message bar layout:
<div class="toolbar messagebar">
  <div class="toolbar-inner">
    <textarea placeholder="Message"></textarea><a href="#" class="link">Send</a>
  </div>
</div>   
In the message bar very important place is an inside of "page" and right before "messages-content":
<div class="page toolbar-fixed">
  <!-- messagebar -->
  <div class="toolbar messagebar">
    <div class="toolbar-inner">
      <textarea placeholder="Message"></textarea><a href="#" class="link">Send</a>
    </div>
  </div>
  <!-- messages-content -->
  <div class="page-content messages-content">
    <div class="messages">
      ... messages
    </div>
  </div>
</div>
You can use below method for initializing message bar with JavaScrpt:
myApp.messagesbar(messagesbarContainer, parameters)
The method takes two options:
  • messagesbarContainer: It's a required HTML element or string that includes messagebar container HTML element.
  • parameters: It specifies an object with messagebar parameters.
For example:
var myMessagebar = app.messagebar('.messagebar', {
    maxHeight: 200
}); 

Messagebar Parameter

maxHeight: It is used to set maximum height of textarea and will be resized depending on amount of it's text. The type of parameter is number and default value is null.

Messagebar Properties

The below table shows the messagebar properties:
S.N.Properties & Description
1 myMessagebar.params
You can specify object with passed initialization parameters.
2 myMessagebar.container
You can specify dom7 element with messagebar container HTML element.
3 myMessagebar.textarea
You can specify dom7 element with messagebar textarea HTML element.

Messagebar Methods

The below table shows the messagebar methods:
S.N.Methods & Description
1 myMessagebar.value(newValue);
It sets messagebar textarea value/text and returns messagebar textarea value, if newValue is not specified.
2 myMessagebar.clear();
It clears the textarea and updates/resets the size.
3 myMessagebar.destroy();
It destroy messagebar instance.

Initialize Messagebar with HTML

You can initialize the messagebar using HTML without JavaScript methods and properties by adding the messagebar-init class to the .messagebar and you can pass required parameters using data- attributes.
The following code specifies initialization of messagebar with HTML:
<div class="toolbar messagebar messagebar-init" data-max-height="200">
  <div class="toolbar-inner">
    <textarea placeholder="Message"></textarea><a href="#" class="link">Send</a>
  </div>
</div>  

Access to Messagebar's Instance

It is possible to access message bar instance, if you initialize it by using HTML and It is achieved by using the f7 Message bar property of its container element.
var myMessagebar = $$('.messagebar')[0].f7Messagebar;
 // Now you can use it
myMessagebar.value('Hello world'); 
You can see the example of Messagebar which is explained in this link

No comments:

Post a Comment